1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2017, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 pragma Style_Checks
(All_Checks
);
33 -- Turn off subprogram ordering, not used for this unit
35 with Atree
; use Atree
;
36 with Elists
; use Elists
;
37 with Namet
; use Namet
;
38 with Nlists
; use Nlists
;
39 with Output
; use Output
;
40 with Sinfo
; use Sinfo
;
41 with Stand
; use Stand
;
45 use Atree
.Unchecked_Access
;
46 -- This is one of the packages that is allowed direct untyped access to
47 -- the fields in a node, since it provides the next level abstraction
48 -- which incorporates appropriate checks.
50 ----------------------------------------------
51 -- Usage of Fields in Defining Entity Nodes --
52 ----------------------------------------------
54 -- Four of these fields are defined in Sinfo, since they in are the base
55 -- part of the node. The access routines for these four fields and the
56 -- corresponding set procedures are defined in Sinfo. These fields are
57 -- present in all entities. Note that Homonym is also in the base part of
58 -- the node, but has access routines that are more properly part of Einfo,
59 -- which is why they are defined here.
66 -- Remaining fields are present only in extended nodes (i.e. entities).
68 -- The following fields are present in all entities
71 -- First_Rep_Item Node6
73 -- Associated_Entity Node37
75 -- The usage of other fields (and the entity kinds to which it applies)
76 -- depends on the particular field (see Einfo spec for details).
78 -- Associated_Node_For_Itype Node8
79 -- Dependent_Instances Elist8
80 -- Hiding_Loop_Variable Node8
81 -- Mechanism Uint8 (but returns Mechanism_Type)
82 -- Normalized_First_Bit Uint8
83 -- Refinement_Constituents Elist8
84 -- Return_Applies_To Node8
85 -- First_Exit_Statement Node8
87 -- Class_Wide_Type Node9
88 -- Current_Value Node9
91 -- Direct_Primitive_Operations Elist10
92 -- Discriminal_Link Node10
93 -- Float_Rep Uint10 (but returns Float_Rep_Kind)
94 -- Handler_Records List10
95 -- Normalized_Position_Max Uint10
96 -- Part_Of_Constituents Elist10
99 -- Component_Bit_Offset Uint11
101 -- Entry_Component Node11
102 -- Enumeration_Pos Uint11
103 -- Generic_Homonym Node11
104 -- Part_Of_References Elist11
105 -- Protected_Body_Subprogram Node11
107 -- Barrier_Function Node12
108 -- Enumeration_Rep Uint12
110 -- Next_Inlined_Subprogram Node12
112 -- Component_Clause Node13
113 -- Elaboration_Entity Node13
114 -- Extra_Accessibility Node13
118 -- Normalized_Position Uint14
119 -- Postconditions_Proc Node14
120 -- Shadow_Entities List14
122 -- Discriminant_Number Uint15
123 -- DT_Position Uint15
124 -- DT_Entry_Count Uint15
125 -- Entry_Parameters_Type Node15
126 -- Extra_Formal Node15
127 -- Pending_Access_Types Elist15
128 -- Related_Instance Node15
129 -- Status_Flag_Or_Transient_Decl Node15
131 -- Access_Disp_Table Elist16
132 -- Body_References Elist16
133 -- Cloned_Subtype Node16
135 -- Entry_Formal Node16
136 -- First_Private_Entity Node16
137 -- Lit_Strings Node16
138 -- Scale_Value Uint16
139 -- String_Literal_Length Uint16
140 -- Unset_Reference Node16
142 -- Actual_Subtype Node17
143 -- Digits_Value Uint17
144 -- Discriminal Node17
145 -- First_Entity Node17
146 -- First_Index Node17
147 -- First_Literal Node17
153 -- Corresponding_Concurrent_Type Node18
154 -- Corresponding_Protected_Entry Node18
155 -- Corresponding_Record_Type Node18
156 -- Delta_Value Ureal18
157 -- Enclosing_Scope Node18
158 -- Equivalent_Type Node18
159 -- Lit_Indexes Node18
160 -- Private_Dependents Elist18
161 -- Renamed_Entity Node18
162 -- Renamed_Object Node18
163 -- String_Literal_Low_Bound Node18
165 -- Body_Entity Node19
166 -- Corresponding_Discriminant Node19
167 -- Default_Aspect_Component_Value Node19
168 -- Default_Aspect_Value Node19
169 -- Entry_Bodies_Array Node19
170 -- Extra_Accessibility_Of_Result Node19
171 -- Non_Limited_View Node19
172 -- Parent_Subtype Node19
173 -- Receiving_Entry Node19
174 -- Size_Check_Code Node19
175 -- Spec_Entity Node19
176 -- Underlying_Full_View Node19
178 -- Component_Type Node20
179 -- Default_Value Node20
180 -- Directly_Designated_Type Node20
181 -- Discriminant_Checking_Func Node20
182 -- Discriminant_Default_Value Node20
183 -- Last_Entity Node20
184 -- Prival_Link Node20
185 -- Register_Exception_Call Node20
186 -- Scalar_Range Node20
188 -- Accept_Address Elist21
189 -- Corresponding_Record_Component Node21
190 -- Default_Expr_Function Node21
191 -- Discriminant_Constraint Elist21
192 -- Interface_Name Node21
193 -- Original_Array_Type Node21
194 -- Small_Value Ureal21
196 -- Associated_Storage_Pool Node22
197 -- Component_Size Uint22
198 -- Corresponding_Remote_Type Node22
199 -- Enumeration_Rep_Expr Node22
200 -- Original_Record_Component Node22
201 -- Private_View Node22
202 -- Protected_Formal Node22
203 -- Scope_Depth_Value Uint22
204 -- Shared_Var_Procs_Instance Node22
206 -- CR_Discriminant Node23
207 -- Entry_Cancel_Parameter Node23
208 -- Enum_Pos_To_Rep Node23
209 -- Extra_Constrained Node23
210 -- Finalization_Master Node23
211 -- Generic_Renamings Elist23
212 -- Inner_Instances Elist23
213 -- Limited_View Node23
214 -- Packed_Array_Impl_Type Node23
215 -- Protection_Object Node23
216 -- Stored_Constraint Elist23
218 -- Incomplete_Actuals Elist24
219 -- Related_Expression Node24
220 -- Subps_Index Uint24
222 -- Contract_Wrapper Node25
223 -- Debug_Renaming_Link Node25
224 -- DT_Offset_To_Top_Func Node25
225 -- Interface_Alias Node25
226 -- Interfaces Elist25
227 -- Related_Array_Object Node25
228 -- Static_Discrete_Predicate List25
229 -- Static_Real_Or_String_Predicate Node25
230 -- Task_Body_Procedure Node25
232 -- Dispatch_Table_Wrappers Elist26
233 -- Last_Assignment Node26
234 -- Overridden_Operation Node26
235 -- Package_Instantiation Node26
236 -- Storage_Size_Variable Node26
238 -- Current_Use_Clause Node27
239 -- Related_Type Node27
240 -- Wrapped_Entity Node27
242 -- Extra_Formals Node28
244 -- Initialization_Statements Node28
245 -- Original_Access_Type Node28
246 -- Relative_Deadline_Variable Node28
247 -- Underlying_Record_View Node28
249 -- Anonymous_Masters Elist29
250 -- BIP_Initialization_Call Node29
251 -- Subprograms_For_Type Elist29
253 -- Access_Disp_Table_Elab_Flag Node30
254 -- Anonymous_Object Node30
255 -- Corresponding_Equality Node30
256 -- Last_Aggregate_Assignment Node30
257 -- Static_Initialization Node30
259 -- Derived_Type_Link Node31
260 -- Thunk_Entity Node31
261 -- Activation_Record_Component Node31
263 -- Corresponding_Function Node32
264 -- Corresponding_Procedure Node32
265 -- Encapsulating_State Node32
266 -- No_Tagged_Streams_Pragma Node32
268 -- Linker_Section_Pragma Node33
272 -- Anonymous_Designated_Type Node35
273 -- Entry_Max_Queue_Lengths_Array Node35
274 -- Import_Pragma Node35
276 -- Nested_Scenarios Elist36
277 -- Validated_Object Node36
279 -- Class_Wide_Clone Node38
281 -- Protected_Subprogram Node39
283 -- SPARK_Pragma Node40
285 -- Original_Protected_Subprogram Node41
286 -- SPARK_Aux_Pragma Node41
288 ---------------------------------------------
289 -- Usage of Flags in Defining Entity Nodes --
290 ---------------------------------------------
292 -- All flags are unique, there is no overlaying, so each flag is physically
293 -- present in every entity. However, for many of the flags, it only makes
294 -- sense for them to be set true for certain subsets of entity kinds. See
295 -- the spec of Einfo for further details.
297 -- Is_Inlined_Always Flag1
298 -- Is_Hidden_Non_Overridden_Subpgm Flag2
301 -- Has_Discriminants Flag5
302 -- Is_Dispatching_Operation Flag6
303 -- Is_Immediately_Visible Flag7
305 -- Is_Potentially_Use_Visible Flag9
309 -- Is_Constrained Flag12
310 -- Is_Generic_Type Flag13
311 -- Depends_On_Private Flag14
313 -- Is_Volatile Flag16
314 -- Is_Internal Flag17
315 -- Has_Delayed_Freeze Flag18
316 -- Is_Abstract_Subprogram Flag19
317 -- Is_Concurrent_Record_Type Flag20
319 -- Has_Master_Entity Flag21
320 -- Needs_No_Actuals Flag22
321 -- Has_Storage_Size_Clause Flag23
322 -- Is_Imported Flag24
323 -- Is_Limited_Record Flag25
324 -- Has_Completion Flag26
325 -- Has_Pragma_Controlled Flag27
326 -- Is_Statically_Allocated Flag28
327 -- Has_Size_Clause Flag29
330 -- Checks_May_Be_Suppressed Flag31
331 -- Kill_Elaboration_Checks Flag32
332 -- Kill_Range_Checks Flag33
333 -- Has_Independent_Components Flag34
334 -- Is_Class_Wide_Equivalent_Type Flag35
335 -- Referenced_As_LHS Flag36
336 -- Is_Known_Non_Null Flag37
337 -- Can_Never_Be_Null Flag38
338 -- Has_Default_Aspect Flag39
339 -- Body_Needed_For_SAL Flag40
341 -- Treat_As_Volatile Flag41
342 -- Is_Controlled_Active Flag42
343 -- Has_Controlled_Component Flag43
345 -- In_Private_Part Flag45
346 -- Has_Alignment_Clause Flag46
348 -- In_Package_Body Flag48
350 -- Delay_Subprogram_Descriptors Flag50
353 -- Is_Entry_Formal Flag52
354 -- Is_Private_Descendant Flag53
355 -- Return_Present Flag54
356 -- Is_Tagged_Type Flag55
357 -- Has_Homonym Flag56
359 -- Non_Binary_Modulus Flag58
360 -- Is_Preelaborated Flag59
361 -- Is_Shared_Passive Flag60
363 -- Is_Remote_Types Flag61
364 -- Is_Remote_Call_Interface Flag62
365 -- Is_Character_Type Flag63
366 -- Is_Intrinsic_Subprogram Flag64
367 -- Has_Record_Rep_Clause Flag65
368 -- Has_Enumeration_Rep_Clause Flag66
369 -- Has_Small_Clause Flag67
370 -- Has_Component_Size_Clause Flag68
371 -- Is_Access_Constant Flag69
372 -- Is_First_Subtype Flag70
374 -- Has_Completion_In_Body Flag71
375 -- Has_Unknown_Discriminants Flag72
376 -- Is_Child_Unit Flag73
377 -- Is_CPP_Class Flag74
378 -- Has_Non_Standard_Rep Flag75
379 -- Is_Constructor Flag76
380 -- Static_Elaboration_Desired Flag77
382 -- Has_All_Calls_Remote Flag79
383 -- Is_Constr_Subt_For_U_Nominal Flag80
385 -- Is_Asynchronous Flag81
386 -- Has_Gigi_Rep_Item Flag82
387 -- Has_Machine_Radix_Clause Flag83
388 -- Machine_Radix_10 Flag84
390 -- Has_Atomic_Components Flag86
391 -- Has_Volatile_Components Flag87
392 -- Discard_Names Flag88
393 -- Is_Interrupt_Handler Flag89
394 -- Returns_By_Ref Flag90
397 -- Size_Known_At_Compile_Time Flag92
398 -- Reverse_Storage_Order Flag93
399 -- Is_Generic_Actual_Type Flag94
400 -- Uses_Sec_Stack Flag95
401 -- Warnings_Off Flag96
402 -- Is_Controlling_Formal Flag97
403 -- Has_Controlling_Result Flag98
404 -- Is_Exported Flag99
405 -- Has_Specified_Layout Flag100
407 -- Has_Nested_Block_With_Handler Flag101
409 -- Is_Completely_Hidden Flag103
410 -- Address_Taken Flag104
411 -- Suppress_Initialization Flag105
412 -- Is_Limited_Composite Flag106
413 -- Is_Private_Composite Flag107
414 -- Default_Expressions_Processed Flag108
415 -- Is_Non_Static_Subtype Flag109
416 -- Has_Out_Or_In_Out_Parameter Flag110
418 -- Is_Formal_Subprogram Flag111
419 -- Is_Renaming_Of_Object Flag112
421 -- Delay_Cleanups Flag114
422 -- Never_Set_In_Source Flag115
423 -- Is_Visible_Lib_Unit Flag116
424 -- Is_Unchecked_Union Flag117
425 -- Is_For_Access_Subtype Flag118
426 -- Has_Convention_Pragma Flag119
427 -- Has_Primitive_Operations Flag120
429 -- Has_Pragma_Pack Flag121
430 -- Is_Bit_Packed_Array Flag122
431 -- Has_Unchecked_Union Flag123
432 -- Is_Eliminated Flag124
433 -- C_Pass_By_Copy Flag125
434 -- Is_Instantiated Flag126
435 -- Is_Valued_Procedure Flag127
436 -- (used for Component_Alignment) Flag128
437 -- (used for Component_Alignment) Flag129
438 -- Is_Generic_Instance Flag130
440 -- No_Pool_Assigned Flag131
441 -- Is_DIC_Procedure Flag132
442 -- Has_Inherited_DIC Flag133
443 -- Has_Aliased_Components Flag135
444 -- No_Strict_Aliasing Flag136
445 -- Is_Machine_Code_Subprogram Flag137
446 -- Is_Packed_Array_Impl_Type Flag138
447 -- Has_Biased_Representation Flag139
448 -- Has_Complex_Representation Flag140
450 -- Is_Constr_Subt_For_UN_Aliased Flag141
451 -- Has_Missing_Return Flag142
452 -- Has_Recursive_Call Flag143
453 -- Is_Unsigned_Type Flag144
454 -- Strict_Alignment Flag145
455 -- Is_Abstract_Type Flag146
456 -- Needs_Debug_Info Flag147
457 -- Is_Elaboration_Checks_OK_Id Flag148
458 -- Is_Compilation_Unit Flag149
459 -- Has_Pragma_Elaborate_Body Flag150
461 -- Has_Private_Ancestor Flag151
462 -- Entry_Accepted Flag152
463 -- Is_Obsolescent Flag153
464 -- Has_Per_Object_Constraint Flag154
465 -- Has_Private_Declaration Flag155
466 -- Referenced Flag156
467 -- Has_Pragma_Inline Flag157
468 -- Finalize_Storage_Only Flag158
469 -- From_Limited_With Flag159
470 -- Is_Package_Body_Entity Flag160
472 -- Has_Qualified_Name Flag161
473 -- Nonzero_Is_True Flag162
474 -- Is_True_Constant Flag163
475 -- Reverse_Bit_Order Flag164
476 -- Suppress_Style_Checks Flag165
477 -- Debug_Info_Off Flag166
478 -- Sec_Stack_Needed_For_Return Flag167
479 -- Materialize_Entity Flag168
480 -- Has_Pragma_Thread_Local_Storage Flag169
481 -- Is_Known_Valid Flag170
483 -- Is_Hidden_Open_Scope Flag171
484 -- Has_Object_Size_Clause Flag172
485 -- Has_Fully_Qualified_Name Flag173
486 -- Elaboration_Entity_Required Flag174
487 -- Has_Forward_Instantiation Flag175
488 -- Is_Discrim_SO_Function Flag176
489 -- Size_Depends_On_Discriminant Flag177
490 -- Is_Null_Init_Proc Flag178
491 -- Has_Pragma_Pure_Function Flag179
492 -- Has_Pragma_Unreferenced Flag180
494 -- Has_Contiguous_Rep Flag181
495 -- Has_Xref_Entry Flag182
496 -- Must_Be_On_Byte_Boundary Flag183
497 -- Has_Stream_Size_Clause Flag184
498 -- Is_Ada_2005_Only Flag185
499 -- Is_Interface Flag186
500 -- Has_Constrained_Partial_View Flag187
501 -- Uses_Lock_Free Flag188
502 -- Is_Pure_Unit_Access_Type Flag189
503 -- Has_Specified_Stream_Input Flag190
505 -- Has_Specified_Stream_Output Flag191
506 -- Has_Specified_Stream_Read Flag192
507 -- Has_Specified_Stream_Write Flag193
508 -- Is_Local_Anonymous_Access Flag194
509 -- Is_Primitive_Wrapper Flag195
510 -- Was_Hidden Flag196
511 -- Is_Limited_Interface Flag197
512 -- Has_Pragma_Ordered Flag198
513 -- Is_Ada_2012_Only Flag199
515 -- Has_Delayed_Aspects Flag200
516 -- Has_Pragma_No_Inline Flag201
517 -- Itype_Printed Flag202
518 -- Has_Pragma_Pure Flag203
519 -- Is_Known_Null Flag204
520 -- Low_Bound_Tested Flag205
521 -- Is_Visible_Formal Flag206
522 -- Known_To_Have_Preelab_Init Flag207
523 -- Must_Have_Preelab_Init Flag208
524 -- Is_Return_Object Flag209
525 -- Elaborate_Body_Desirable Flag210
527 -- Has_Static_Discriminants Flag211
528 -- Has_Pragma_Unreferenced_Objects Flag212
529 -- Requires_Overriding Flag213
531 -- Is_Param_Block_Component_Type Flag215
532 -- Universal_Aliasing Flag216
533 -- Suppress_Value_Tracking_On_Call Flag217
534 -- Is_Primitive Flag218
535 -- Has_Initial_Value Flag219
536 -- Has_Dispatch_Table Flag220
538 -- Has_Pragma_Preelab_Init Flag221
539 -- Used_As_Generic_Actual Flag222
540 -- Is_Descendant_Of_Address Flag223
543 -- Is_Only_Out_Parameter Flag226
544 -- Referenced_As_Out_Parameter Flag227
545 -- Has_Thunks Flag228
546 -- Can_Use_Internal_Rep Flag229
547 -- Has_Pragma_Inline_Always Flag230
549 -- Renamed_In_Spec Flag231
550 -- Has_Own_Invariants Flag232
551 -- Has_Pragma_Unmodified Flag233
552 -- Is_Dispatch_Table_Entity Flag234
553 -- Is_Trivial_Subprogram Flag235
554 -- Warnings_Off_Used Flag236
555 -- Warnings_Off_Used_Unmodified Flag237
556 -- Warnings_Off_Used_Unreferenced Flag238
557 -- No_Reordering Flag239
558 -- Has_Expanded_Contract Flag240
560 -- Optimize_Alignment_Space Flag241
561 -- Optimize_Alignment_Time Flag242
562 -- Overlays_Constant Flag243
563 -- Is_RACW_Stub_Type Flag244
564 -- Is_Private_Primitive Flag245
565 -- Is_Underlying_Record_View Flag246
566 -- OK_To_Rename Flag247
567 -- Has_Inheritable_Invariants Flag248
568 -- Is_Safe_To_Reevaluate Flag249
569 -- Has_Predicates Flag250
571 -- Has_Implicit_Dereference Flag251
572 -- Is_Finalized_Transient Flag252
573 -- Disable_Controlled Flag253
574 -- Is_Implementation_Defined Flag254
575 -- Is_Predicate_Function Flag255
576 -- Is_Predicate_Function_M Flag256
577 -- Is_Invariant_Procedure Flag257
578 -- Has_Dynamic_Predicate_Aspect Flag258
579 -- Has_Static_Predicate_Aspect Flag259
580 -- Has_Loop_Entry_Attributes Flag260
582 -- Has_Delayed_Rep_Aspects Flag261
583 -- May_Inherit_Delayed_Rep_Aspects Flag262
584 -- Has_Visible_Refinement Flag263
585 -- Is_Discriminant_Check_Function Flag264
586 -- SPARK_Pragma_Inherited Flag265
587 -- SPARK_Aux_Pragma_Inherited Flag266
588 -- Has_Shift_Operator Flag267
589 -- Is_Independent Flag268
590 -- Has_Static_Predicate Flag269
591 -- Stores_Attribute_Old_Prefix Flag270
593 -- Has_Protected Flag271
594 -- SSO_Set_Low_By_Default Flag272
595 -- SSO_Set_High_By_Default Flag273
596 -- Is_Generic_Actual_Subprogram Flag274
597 -- No_Predicate_On_Actual Flag275
598 -- No_Dynamic_Predicate_On_Actual Flag276
599 -- Is_Checked_Ghost_Entity Flag277
600 -- Is_Ignored_Ghost_Entity Flag278
601 -- Contains_Ignored_Ghost_Code Flag279
602 -- Partial_View_Has_Unknown_Discr Flag280
604 -- Is_Static_Type Flag281
605 -- Has_Nested_Subprogram Flag282
606 -- Is_Uplevel_Referenced_Entity Flag283
607 -- Is_Unimplemented Flag284
608 -- Is_Volatile_Full_Access Flag285
609 -- Is_Exception_Handler Flag286
610 -- Rewritten_For_C Flag287
611 -- Predicates_Ignored Flag288
612 -- Has_Timing_Event Flag289
613 -- Is_Class_Wide_Clone Flag290
615 -- Has_Inherited_Invariants Flag291
616 -- Is_Partial_Invariant_Procedure Flag292
617 -- Is_Actual_Subtype Flag293
618 -- Has_Pragma_Unused Flag294
619 -- Is_Ignored_Transient Flag295
620 -- Has_Partial_Visible_Refinement Flag296
621 -- Is_Entry_Wrapper Flag297
622 -- Is_Underlying_Full_View Flag298
623 -- Body_Needed_For_Inlining Flag299
624 -- Has_Private_Extension Flag300
626 -- Ignore_SPARK_Mode_Pragmas Flag301
627 -- Is_Initial_Condition_Procedure Flag302
637 -- Note: Flag310-317 are defined in atree.ads/adb, but not yet in atree.h
639 -----------------------
640 -- Local subprograms --
641 -----------------------
644 (State_Id
: Entity_Id
;
645 Option_Nam
: Name_Id
) return Boolean;
646 -- Determine whether abstract state State_Id has particular option denoted
647 -- by the name Option_Nam.
653 function Float_Rep
(Id
: E
) return F
is
654 pragma Assert
(Is_Floating_Point_Type
(Id
));
656 return F
'Val (UI_To_Int
(Uint10
(Base_Type
(Id
))));
664 (State_Id
: Entity_Id
;
665 Option_Nam
: Name_Id
) return Boolean
667 Decl
: constant Node_Id
:= Parent
(State_Id
);
672 pragma Assert
(Ekind
(State_Id
) = E_Abstract_State
);
674 -- The declaration of abstract states with options appear as an
675 -- extension aggregate. If this is not the case, the option is not
678 if Nkind
(Decl
) /= N_Extension_Aggregate
then
684 Opt
:= First
(Expressions
(Decl
));
685 while Present
(Opt
) loop
686 if Nkind
(Opt
) = N_Identifier
and then Chars
(Opt
) = Option_Nam
then
693 -- Complex options with various specifiers
695 Opt
:= First
(Component_Associations
(Decl
));
696 while Present
(Opt
) loop
697 Opt_Nam
:= First
(Choices
(Opt
));
699 if Nkind
(Opt_Nam
) = N_Identifier
700 and then Chars
(Opt_Nam
) = Option_Nam
711 --------------------------------
712 -- Attribute Access Functions --
713 --------------------------------
715 function Abstract_States
(Id
: E
) return L
is
717 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
721 function Accept_Address
(Id
: E
) return L
is
726 function Access_Disp_Table
(Id
: E
) return L
is
728 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
,
730 E_Record_Type_With_Private
));
731 return Elist16
(Implementation_Base_Type
(Id
));
732 end Access_Disp_Table
;
734 function Access_Disp_Table_Elab_Flag
(Id
: E
) return E
is
736 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
,
738 E_Record_Type_With_Private
));
739 return Node30
(Implementation_Base_Type
(Id
));
740 end Access_Disp_Table_Elab_Flag
;
742 function Activation_Record_Component
(Id
: E
) return E
is
744 pragma Assert
(Ekind_In
(Id
, E_Constant
,
751 end Activation_Record_Component
;
753 function Actual_Subtype
(Id
: E
) return E
is
756 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
757 or else Is_Formal
(Id
));
761 function Address_Taken
(Id
: E
) return B
is
766 function Alias
(Id
: E
) return E
is
769 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
773 function Alignment
(Id
: E
) return U
is
775 pragma Assert
(Is_Type
(Id
)
776 or else Is_Formal
(Id
)
777 or else Ekind_In
(Id
, E_Loop_Parameter
,
784 function Anonymous_Designated_Type
(Id
: E
) return E
is
786 pragma Assert
(Ekind
(Id
) = E_Variable
);
788 end Anonymous_Designated_Type
;
790 function Anonymous_Masters
(Id
: E
) return L
is
792 pragma Assert
(Ekind_In
(Id
, E_Function
,
797 end Anonymous_Masters
;
799 function Anonymous_Object
(Id
: E
) return E
is
801 pragma Assert
(Ekind_In
(Id
, E_Protected_Type
, E_Task_Type
));
803 end Anonymous_Object
;
805 function Associated_Entity
(Id
: E
) return E
is
808 end Associated_Entity
;
810 function Associated_Formal_Package
(Id
: E
) return E
is
812 pragma Assert
(Ekind
(Id
) = E_Package
);
814 end Associated_Formal_Package
;
816 function Associated_Node_For_Itype
(Id
: E
) return N
is
819 end Associated_Node_For_Itype
;
821 function Associated_Storage_Pool
(Id
: E
) return E
is
823 pragma Assert
(Is_Access_Type
(Id
));
824 return Node22
(Root_Type
(Id
));
825 end Associated_Storage_Pool
;
827 function Barrier_Function
(Id
: E
) return N
is
829 pragma Assert
(Is_Entry
(Id
));
831 end Barrier_Function
;
833 function Block_Node
(Id
: E
) return N
is
835 pragma Assert
(Ekind
(Id
) = E_Block
);
839 function Body_Entity
(Id
: E
) return E
is
841 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
845 function Body_Needed_For_Inlining
(Id
: E
) return B
is
847 pragma Assert
(Ekind
(Id
) = E_Package
);
849 end Body_Needed_For_Inlining
;
851 function Body_Needed_For_SAL
(Id
: E
) return B
is
854 (Ekind
(Id
) = E_Package
855 or else Is_Subprogram
(Id
)
856 or else Is_Generic_Unit
(Id
));
858 end Body_Needed_For_SAL
;
860 function Body_References
(Id
: E
) return L
is
862 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
866 function BIP_Initialization_Call
(Id
: E
) return N
is
868 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
870 end BIP_Initialization_Call
;
872 function C_Pass_By_Copy
(Id
: E
) return B
is
874 pragma Assert
(Is_Record_Type
(Id
));
875 return Flag125
(Implementation_Base_Type
(Id
));
878 function Can_Never_Be_Null
(Id
: E
) return B
is
881 end Can_Never_Be_Null
;
883 function Checks_May_Be_Suppressed
(Id
: E
) return B
is
886 end Checks_May_Be_Suppressed
;
888 function Class_Wide_Clone
(Id
: E
) return E
is
890 pragma Assert
(Is_Subprogram
(Id
));
892 end Class_Wide_Clone
;
894 function Class_Wide_Type
(Id
: E
) return E
is
896 pragma Assert
(Is_Type
(Id
));
900 function Cloned_Subtype
(Id
: E
) return E
is
902 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
906 function Component_Bit_Offset
(Id
: E
) return U
is
908 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
910 end Component_Bit_Offset
;
912 function Component_Clause
(Id
: E
) return N
is
914 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
916 end Component_Clause
;
918 function Component_Size
(Id
: E
) return U
is
920 pragma Assert
(Is_Array_Type
(Id
));
921 return Uint22
(Implementation_Base_Type
(Id
));
924 function Component_Type
(Id
: E
) return E
is
926 pragma Assert
(Is_Array_Type
(Id
));
927 return Node20
(Implementation_Base_Type
(Id
));
930 function Corresponding_Concurrent_Type
(Id
: E
) return E
is
932 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
934 end Corresponding_Concurrent_Type
;
936 function Corresponding_Discriminant
(Id
: E
) return E
is
938 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
940 end Corresponding_Discriminant
;
942 function Corresponding_Equality
(Id
: E
) return E
is
945 (Ekind
(Id
) = E_Function
946 and then not Comes_From_Source
(Id
)
947 and then Chars
(Id
) = Name_Op_Ne
);
949 end Corresponding_Equality
;
951 function Corresponding_Function
(Id
: E
) return E
is
953 pragma Assert
(Ekind
(Id
) = E_Procedure
);
955 end Corresponding_Function
;
957 function Corresponding_Procedure
(Id
: E
) return E
is
959 pragma Assert
(Ekind
(Id
) = E_Function
);
961 end Corresponding_Procedure
;
963 function Corresponding_Protected_Entry
(Id
: E
) return E
is
965 pragma Assert
(Ekind
(Id
) = E_Subprogram_Body
);
967 end Corresponding_Protected_Entry
;
969 function Corresponding_Record_Component
(Id
: E
) return E
is
971 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
973 end Corresponding_Record_Component
;
975 function Corresponding_Record_Type
(Id
: E
) return E
is
977 pragma Assert
(Is_Concurrent_Type
(Id
));
979 end Corresponding_Record_Type
;
981 function Corresponding_Remote_Type
(Id
: E
) return E
is
984 end Corresponding_Remote_Type
;
986 function Current_Use_Clause
(Id
: E
) return E
is
988 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
990 end Current_Use_Clause
;
992 function Current_Value
(Id
: E
) return N
is
994 pragma Assert
(Ekind
(Id
) in Object_Kind
);
998 function CR_Discriminant
(Id
: E
) return E
is
1001 end CR_Discriminant
;
1003 function Debug_Info_Off
(Id
: E
) return B
is
1005 return Flag166
(Id
);
1008 function Debug_Renaming_Link
(Id
: E
) return E
is
1011 end Debug_Renaming_Link
;
1013 function Default_Aspect_Component_Value
(Id
: E
) return N
is
1015 pragma Assert
(Is_Array_Type
(Id
));
1016 return Node19
(Base_Type
(Id
));
1017 end Default_Aspect_Component_Value
;
1019 function Default_Aspect_Value
(Id
: E
) return N
is
1021 pragma Assert
(Is_Scalar_Type
(Id
));
1022 return Node19
(Base_Type
(Id
));
1023 end Default_Aspect_Value
;
1025 function Default_Expr_Function
(Id
: E
) return E
is
1027 pragma Assert
(Is_Formal
(Id
));
1029 end Default_Expr_Function
;
1031 function Default_Expressions_Processed
(Id
: E
) return B
is
1033 return Flag108
(Id
);
1034 end Default_Expressions_Processed
;
1036 function Default_Value
(Id
: E
) return N
is
1038 pragma Assert
(Is_Formal
(Id
));
1042 function Delay_Cleanups
(Id
: E
) return B
is
1044 return Flag114
(Id
);
1047 function Delay_Subprogram_Descriptors
(Id
: E
) return B
is
1050 end Delay_Subprogram_Descriptors
;
1052 function Delta_Value
(Id
: E
) return R
is
1054 pragma Assert
(Is_Fixed_Point_Type
(Id
));
1055 return Ureal18
(Id
);
1058 function Dependent_Instances
(Id
: E
) return L
is
1060 pragma Assert
(Is_Generic_Instance
(Id
));
1062 end Dependent_Instances
;
1064 function Depends_On_Private
(Id
: E
) return B
is
1066 pragma Assert
(Nkind
(Id
) in N_Entity
);
1068 end Depends_On_Private
;
1070 function Derived_Type_Link
(Id
: E
) return E
is
1072 pragma Assert
(Is_Type
(Id
));
1073 return Node31
(Base_Type
(Id
));
1074 end Derived_Type_Link
;
1076 function Digits_Value
(Id
: E
) return U
is
1079 (Is_Floating_Point_Type
(Id
)
1080 or else Is_Decimal_Fixed_Point_Type
(Id
));
1084 function Direct_Primitive_Operations
(Id
: E
) return L
is
1086 pragma Assert
(Is_Tagged_Type
(Id
));
1087 return Elist10
(Id
);
1088 end Direct_Primitive_Operations
;
1090 function Directly_Designated_Type
(Id
: E
) return E
is
1092 pragma Assert
(Is_Access_Type
(Id
));
1094 end Directly_Designated_Type
;
1096 function Disable_Controlled
(Id
: E
) return B
is
1098 return Flag253
(Base_Type
(Id
));
1099 end Disable_Controlled
;
1101 function Discard_Names
(Id
: E
) return B
is
1106 function Discriminal
(Id
: E
) return E
is
1108 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1112 function Discriminal_Link
(Id
: E
) return N
is
1115 end Discriminal_Link
;
1117 function Discriminant_Checking_Func
(Id
: E
) return E
is
1119 pragma Assert
(Ekind
(Id
) = E_Component
);
1121 end Discriminant_Checking_Func
;
1123 function Discriminant_Constraint
(Id
: E
) return L
is
1125 pragma Assert
(Is_Composite_Type
(Id
) and then Has_Discriminants
(Id
));
1126 return Elist21
(Id
);
1127 end Discriminant_Constraint
;
1129 function Discriminant_Default_Value
(Id
: E
) return N
is
1131 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1133 end Discriminant_Default_Value
;
1135 function Discriminant_Number
(Id
: E
) return U
is
1137 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
1139 end Discriminant_Number
;
1141 function Dispatch_Table_Wrappers
(Id
: E
) return L
is
1143 pragma Assert
(Ekind_In
(Id
, E_Record_Type
,
1145 return Elist26
(Implementation_Base_Type
(Id
));
1146 end Dispatch_Table_Wrappers
;
1148 function DT_Entry_Count
(Id
: E
) return U
is
1150 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1154 function DT_Offset_To_Top_Func
(Id
: E
) return E
is
1156 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
1158 end DT_Offset_To_Top_Func
;
1160 function DT_Position
(Id
: E
) return U
is
1162 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
1163 and then Present
(DTC_Entity
(Id
)));
1167 function DTC_Entity
(Id
: E
) return E
is
1169 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
1173 function Elaborate_Body_Desirable
(Id
: E
) return B
is
1175 pragma Assert
(Ekind
(Id
) = E_Package
);
1176 return Flag210
(Id
);
1177 end Elaborate_Body_Desirable
;
1179 function Elaboration_Entity
(Id
: E
) return E
is
1184 Ekind
(Id
) = E_Package
1186 Is_Generic_Unit
(Id
));
1188 end Elaboration_Entity
;
1190 function Elaboration_Entity_Required
(Id
: E
) return B
is
1195 Ekind
(Id
) = E_Package
1197 Is_Generic_Unit
(Id
));
1198 return Flag174
(Id
);
1199 end Elaboration_Entity_Required
;
1201 function Encapsulating_State
(Id
: E
) return N
is
1203 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Constant
, E_Variable
));
1205 end Encapsulating_State
;
1207 function Enclosing_Scope
(Id
: E
) return E
is
1210 end Enclosing_Scope
;
1212 function Entry_Accepted
(Id
: E
) return B
is
1214 pragma Assert
(Is_Entry
(Id
));
1215 return Flag152
(Id
);
1218 function Entry_Bodies_Array
(Id
: E
) return E
is
1221 end Entry_Bodies_Array
;
1223 function Entry_Cancel_Parameter
(Id
: E
) return E
is
1226 end Entry_Cancel_Parameter
;
1228 function Entry_Component
(Id
: E
) return E
is
1231 end Entry_Component
;
1233 function Entry_Formal
(Id
: E
) return E
is
1238 function Entry_Index_Constant
(Id
: E
) return N
is
1240 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
1242 end Entry_Index_Constant
;
1244 function Entry_Max_Queue_Lengths_Array
(Id
: E
) return N
is
1246 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
1248 end Entry_Max_Queue_Lengths_Array
;
1250 function Contains_Ignored_Ghost_Code
(Id
: E
) return B
is
1253 (Ekind_In
(Id
, E_Block
,
1257 E_Generic_Procedure
,
1261 E_Subprogram_Body
));
1262 return Flag279
(Id
);
1263 end Contains_Ignored_Ghost_Code
;
1265 function Contract
(Id
: E
) return N
is
1268 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent variants
1272 Ekind_In
(Id
, E_Constant
, -- object variants
1275 Ekind_In
(Id
, E_Entry
, -- overloadable variants
1279 E_Generic_Procedure
,
1284 Ekind_In
(Id
, E_Generic_Package
, -- package variants
1288 Ekind
(Id
) = E_Void
); -- special purpose
1292 function Contract_Wrapper
(Id
: E
) return E
is
1294 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
1296 end Contract_Wrapper
;
1298 function Entry_Parameters_Type
(Id
: E
) return E
is
1301 end Entry_Parameters_Type
;
1303 function Enum_Pos_To_Rep
(Id
: E
) return E
is
1305 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
1307 end Enum_Pos_To_Rep
;
1309 function Enumeration_Pos
(Id
: E
) return Uint
is
1311 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1313 end Enumeration_Pos
;
1315 function Enumeration_Rep
(Id
: E
) return U
is
1317 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1319 end Enumeration_Rep
;
1321 function Enumeration_Rep_Expr
(Id
: E
) return N
is
1323 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
1325 end Enumeration_Rep_Expr
;
1327 function Equivalent_Type
(Id
: E
) return E
is
1330 (Ekind_In
(Id
, E_Class_Wide_Type
,
1331 E_Class_Wide_Subtype
,
1332 E_Access_Subprogram_Type
,
1333 E_Access_Protected_Subprogram_Type
,
1334 E_Anonymous_Access_Protected_Subprogram_Type
,
1335 E_Access_Subprogram_Type
,
1338 end Equivalent_Type
;
1340 function Esize
(Id
: E
) return Uint
is
1345 function Extra_Accessibility
(Id
: E
) return E
is
1348 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
1350 end Extra_Accessibility
;
1352 function Extra_Accessibility_Of_Result
(Id
: E
) return E
is
1354 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
1356 end Extra_Accessibility_Of_Result
;
1358 function Extra_Constrained
(Id
: E
) return E
is
1360 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
1362 end Extra_Constrained
;
1364 function Extra_Formal
(Id
: E
) return E
is
1369 function Extra_Formals
(Id
: E
) return E
is
1372 (Is_Overloadable
(Id
)
1373 or else Ekind_In
(Id
, E_Entry_Family
,
1375 E_Subprogram_Type
));
1379 function Can_Use_Internal_Rep
(Id
: E
) return B
is
1381 pragma Assert
(Is_Access_Subprogram_Type
(Base_Type
(Id
)));
1382 return Flag229
(Base_Type
(Id
));
1383 end Can_Use_Internal_Rep
;
1385 function Finalization_Master
(Id
: E
) return E
is
1387 pragma Assert
(Is_Access_Type
(Id
));
1388 return Node23
(Root_Type
(Id
));
1389 end Finalization_Master
;
1391 function Finalize_Storage_Only
(Id
: E
) return B
is
1393 pragma Assert
(Is_Type
(Id
));
1394 return Flag158
(Base_Type
(Id
));
1395 end Finalize_Storage_Only
;
1397 function Finalizer
(Id
: E
) return E
is
1399 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
1403 function First_Entity
(Id
: E
) return E
is
1408 function First_Exit_Statement
(Id
: E
) return N
is
1410 pragma Assert
(Ekind
(Id
) = E_Loop
);
1412 end First_Exit_Statement
;
1414 function First_Index
(Id
: E
) return N
is
1416 pragma Assert
(Is_Array_Type
(Id
));
1420 function First_Literal
(Id
: E
) return E
is
1422 pragma Assert
(Is_Enumeration_Type
(Id
));
1426 function First_Private_Entity
(Id
: E
) return E
is
1428 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
1429 or else Ekind
(Id
) in Concurrent_Kind
);
1431 end First_Private_Entity
;
1433 function First_Rep_Item
(Id
: E
) return E
is
1438 function Freeze_Node
(Id
: E
) return N
is
1443 function From_Limited_With
(Id
: E
) return B
is
1445 return Flag159
(Id
);
1446 end From_Limited_With
;
1448 function Full_View
(Id
: E
) return E
is
1450 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
1454 function Generic_Homonym
(Id
: E
) return E
is
1456 pragma Assert
(Ekind
(Id
) = E_Generic_Package
);
1458 end Generic_Homonym
;
1460 function Generic_Renamings
(Id
: E
) return L
is
1462 return Elist23
(Id
);
1463 end Generic_Renamings
;
1465 function Handler_Records
(Id
: E
) return S
is
1468 end Handler_Records
;
1470 function Has_Aliased_Components
(Id
: E
) return B
is
1472 return Flag135
(Implementation_Base_Type
(Id
));
1473 end Has_Aliased_Components
;
1475 function Has_Alignment_Clause
(Id
: E
) return B
is
1478 end Has_Alignment_Clause
;
1480 function Has_All_Calls_Remote
(Id
: E
) return B
is
1483 end Has_All_Calls_Remote
;
1485 function Has_Atomic_Components
(Id
: E
) return B
is
1487 return Flag86
(Implementation_Base_Type
(Id
));
1488 end Has_Atomic_Components
;
1490 function Has_Biased_Representation
(Id
: E
) return B
is
1492 return Flag139
(Id
);
1493 end Has_Biased_Representation
;
1495 function Has_Completion
(Id
: E
) return B
is
1500 function Has_Completion_In_Body
(Id
: E
) return B
is
1502 pragma Assert
(Is_Type
(Id
));
1504 end Has_Completion_In_Body
;
1506 function Has_Complex_Representation
(Id
: E
) return B
is
1508 pragma Assert
(Is_Record_Type
(Id
));
1509 return Flag140
(Implementation_Base_Type
(Id
));
1510 end Has_Complex_Representation
;
1512 function Has_Component_Size_Clause
(Id
: E
) return B
is
1514 pragma Assert
(Is_Array_Type
(Id
));
1515 return Flag68
(Implementation_Base_Type
(Id
));
1516 end Has_Component_Size_Clause
;
1518 function Has_Constrained_Partial_View
(Id
: E
) return B
is
1520 pragma Assert
(Is_Type
(Id
));
1521 return Flag187
(Id
);
1522 end Has_Constrained_Partial_View
;
1524 function Has_Controlled_Component
(Id
: E
) return B
is
1526 return Flag43
(Base_Type
(Id
));
1527 end Has_Controlled_Component
;
1529 function Has_Contiguous_Rep
(Id
: E
) return B
is
1531 return Flag181
(Id
);
1532 end Has_Contiguous_Rep
;
1534 function Has_Controlling_Result
(Id
: E
) return B
is
1537 end Has_Controlling_Result
;
1539 function Has_Convention_Pragma
(Id
: E
) return B
is
1541 return Flag119
(Id
);
1542 end Has_Convention_Pragma
;
1544 function Has_Default_Aspect
(Id
: E
) return B
is
1546 return Flag39
(Base_Type
(Id
));
1547 end Has_Default_Aspect
;
1549 function Has_Delayed_Aspects
(Id
: E
) return B
is
1551 pragma Assert
(Nkind
(Id
) in N_Entity
);
1552 return Flag200
(Id
);
1553 end Has_Delayed_Aspects
;
1555 function Has_Delayed_Freeze
(Id
: E
) return B
is
1557 pragma Assert
(Nkind
(Id
) in N_Entity
);
1559 end Has_Delayed_Freeze
;
1561 function Has_Delayed_Rep_Aspects
(Id
: E
) return B
is
1563 pragma Assert
(Nkind
(Id
) in N_Entity
);
1564 return Flag261
(Id
);
1565 end Has_Delayed_Rep_Aspects
;
1567 function Has_Discriminants
(Id
: E
) return B
is
1569 pragma Assert
(Nkind
(Id
) in N_Entity
);
1571 end Has_Discriminants
;
1573 function Has_Dispatch_Table
(Id
: E
) return B
is
1575 pragma Assert
(Is_Tagged_Type
(Id
));
1576 return Flag220
(Id
);
1577 end Has_Dispatch_Table
;
1579 function Has_Dynamic_Predicate_Aspect
(Id
: E
) return B
is
1581 pragma Assert
(Is_Type
(Id
));
1582 return Flag258
(Id
);
1583 end Has_Dynamic_Predicate_Aspect
;
1585 function Has_Enumeration_Rep_Clause
(Id
: E
) return B
is
1587 pragma Assert
(Is_Enumeration_Type
(Id
));
1589 end Has_Enumeration_Rep_Clause
;
1591 function Has_Exit
(Id
: E
) return B
is
1596 function Has_Expanded_Contract
(Id
: E
) return B
is
1598 pragma Assert
(Is_Subprogram
(Id
));
1599 return Flag240
(Id
);
1600 end Has_Expanded_Contract
;
1602 function Has_Forward_Instantiation
(Id
: E
) return B
is
1604 return Flag175
(Id
);
1605 end Has_Forward_Instantiation
;
1607 function Has_Fully_Qualified_Name
(Id
: E
) return B
is
1609 return Flag173
(Id
);
1610 end Has_Fully_Qualified_Name
;
1612 function Has_Gigi_Rep_Item
(Id
: E
) return B
is
1615 end Has_Gigi_Rep_Item
;
1617 function Has_Homonym
(Id
: E
) return B
is
1622 function Has_Implicit_Dereference
(Id
: E
) return B
is
1624 return Flag251
(Id
);
1625 end Has_Implicit_Dereference
;
1627 function Has_Independent_Components
(Id
: E
) return B
is
1629 return Flag34
(Implementation_Base_Type
(Id
));
1630 end Has_Independent_Components
;
1632 function Has_Inheritable_Invariants
(Id
: E
) return B
is
1634 pragma Assert
(Is_Type
(Id
));
1635 return Flag248
(Base_Type
(Id
));
1636 end Has_Inheritable_Invariants
;
1638 function Has_Inherited_DIC
(Id
: E
) return B
is
1640 pragma Assert
(Is_Type
(Id
));
1641 return Flag133
(Base_Type
(Id
));
1642 end Has_Inherited_DIC
;
1644 function Has_Inherited_Invariants
(Id
: E
) return B
is
1646 pragma Assert
(Is_Type
(Id
));
1647 return Flag291
(Base_Type
(Id
));
1648 end Has_Inherited_Invariants
;
1650 function Has_Initial_Value
(Id
: E
) return B
is
1652 pragma Assert
(Ekind
(Id
) = E_Variable
or else Is_Formal
(Id
));
1653 return Flag219
(Id
);
1654 end Has_Initial_Value
;
1656 function Has_Loop_Entry_Attributes
(Id
: E
) return B
is
1658 pragma Assert
(Ekind
(Id
) = E_Loop
);
1659 return Flag260
(Id
);
1660 end Has_Loop_Entry_Attributes
;
1662 function Has_Machine_Radix_Clause
(Id
: E
) return B
is
1664 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
1666 end Has_Machine_Radix_Clause
;
1668 function Has_Master_Entity
(Id
: E
) return B
is
1671 end Has_Master_Entity
;
1673 function Has_Missing_Return
(Id
: E
) return B
is
1675 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
1676 return Flag142
(Id
);
1677 end Has_Missing_Return
;
1679 function Has_Nested_Block_With_Handler
(Id
: E
) return B
is
1681 return Flag101
(Id
);
1682 end Has_Nested_Block_With_Handler
;
1684 function Has_Nested_Subprogram
(Id
: E
) return B
is
1686 pragma Assert
(Is_Subprogram
(Id
));
1687 return Flag282
(Id
);
1688 end Has_Nested_Subprogram
;
1690 function Has_Non_Standard_Rep
(Id
: E
) return B
is
1692 return Flag75
(Implementation_Base_Type
(Id
));
1693 end Has_Non_Standard_Rep
;
1695 function Has_Object_Size_Clause
(Id
: E
) return B
is
1697 pragma Assert
(Is_Type
(Id
));
1698 return Flag172
(Id
);
1699 end Has_Object_Size_Clause
;
1701 function Has_Out_Or_In_Out_Parameter
(Id
: E
) return B
is
1704 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
)
1705 or else Is_Subprogram_Or_Generic_Subprogram
(Id
));
1706 return Flag110
(Id
);
1707 end Has_Out_Or_In_Out_Parameter
;
1709 function Has_Own_DIC
(Id
: E
) return B
is
1711 pragma Assert
(Is_Type
(Id
));
1712 return Flag3
(Base_Type
(Id
));
1715 function Has_Own_Invariants
(Id
: E
) return B
is
1717 pragma Assert
(Is_Type
(Id
));
1718 return Flag232
(Base_Type
(Id
));
1719 end Has_Own_Invariants
;
1721 function Has_Partial_Visible_Refinement
(Id
: E
) return B
is
1723 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
1724 return Flag296
(Id
);
1725 end Has_Partial_Visible_Refinement
;
1727 function Has_Per_Object_Constraint
(Id
: E
) return B
is
1729 return Flag154
(Id
);
1730 end Has_Per_Object_Constraint
;
1732 function Has_Pragma_Controlled
(Id
: E
) return B
is
1734 pragma Assert
(Is_Access_Type
(Id
));
1735 return Flag27
(Implementation_Base_Type
(Id
));
1736 end Has_Pragma_Controlled
;
1738 function Has_Pragma_Elaborate_Body
(Id
: E
) return B
is
1740 return Flag150
(Id
);
1741 end Has_Pragma_Elaborate_Body
;
1743 function Has_Pragma_Inline
(Id
: E
) return B
is
1745 return Flag157
(Id
);
1746 end Has_Pragma_Inline
;
1748 function Has_Pragma_Inline_Always
(Id
: E
) return B
is
1750 return Flag230
(Id
);
1751 end Has_Pragma_Inline_Always
;
1753 function Has_Pragma_No_Inline
(Id
: E
) return B
is
1755 return Flag201
(Id
);
1756 end Has_Pragma_No_Inline
;
1758 function Has_Pragma_Ordered
(Id
: E
) return B
is
1760 pragma Assert
(Is_Enumeration_Type
(Id
));
1761 return Flag198
(Implementation_Base_Type
(Id
));
1762 end Has_Pragma_Ordered
;
1764 function Has_Pragma_Pack
(Id
: E
) return B
is
1766 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
1767 return Flag121
(Implementation_Base_Type
(Id
));
1768 end Has_Pragma_Pack
;
1770 function Has_Pragma_Preelab_Init
(Id
: E
) return B
is
1772 return Flag221
(Id
);
1773 end Has_Pragma_Preelab_Init
;
1775 function Has_Pragma_Pure
(Id
: E
) return B
is
1777 return Flag203
(Id
);
1778 end Has_Pragma_Pure
;
1780 function Has_Pragma_Pure_Function
(Id
: E
) return B
is
1782 return Flag179
(Id
);
1783 end Has_Pragma_Pure_Function
;
1785 function Has_Pragma_Thread_Local_Storage
(Id
: E
) return B
is
1787 return Flag169
(Id
);
1788 end Has_Pragma_Thread_Local_Storage
;
1790 function Has_Pragma_Unmodified
(Id
: E
) return B
is
1792 return Flag233
(Id
);
1793 end Has_Pragma_Unmodified
;
1795 function Has_Pragma_Unreferenced
(Id
: E
) return B
is
1797 return Flag180
(Id
);
1798 end Has_Pragma_Unreferenced
;
1800 function Has_Pragma_Unreferenced_Objects
(Id
: E
) return B
is
1802 pragma Assert
(Is_Type
(Id
));
1803 return Flag212
(Id
);
1804 end Has_Pragma_Unreferenced_Objects
;
1806 function Has_Pragma_Unused
(Id
: E
) return B
is
1808 return Flag294
(Id
);
1809 end Has_Pragma_Unused
;
1811 function Has_Predicates
(Id
: E
) return B
is
1813 pragma Assert
(Is_Type
(Id
));
1814 return Flag250
(Id
);
1817 function Has_Primitive_Operations
(Id
: E
) return B
is
1819 pragma Assert
(Is_Type
(Id
));
1820 return Flag120
(Base_Type
(Id
));
1821 end Has_Primitive_Operations
;
1823 function Has_Private_Ancestor
(Id
: E
) return B
is
1825 return Flag151
(Id
);
1826 end Has_Private_Ancestor
;
1828 function Has_Private_Declaration
(Id
: E
) return B
is
1830 return Flag155
(Id
);
1831 end Has_Private_Declaration
;
1833 function Has_Private_Extension
(Id
: E
) return B
is
1835 pragma Assert
(Is_Tagged_Type
(Id
));
1836 return Flag300
(Id
);
1837 end Has_Private_Extension
;
1839 function Has_Protected
(Id
: E
) return B
is
1841 return Flag271
(Base_Type
(Id
));
1844 function Has_Qualified_Name
(Id
: E
) return B
is
1846 return Flag161
(Id
);
1847 end Has_Qualified_Name
;
1849 function Has_RACW
(Id
: E
) return B
is
1851 pragma Assert
(Ekind
(Id
) = E_Package
);
1852 return Flag214
(Id
);
1855 function Has_Record_Rep_Clause
(Id
: E
) return B
is
1857 pragma Assert
(Is_Record_Type
(Id
));
1858 return Flag65
(Implementation_Base_Type
(Id
));
1859 end Has_Record_Rep_Clause
;
1861 function Has_Recursive_Call
(Id
: E
) return B
is
1863 pragma Assert
(Is_Subprogram
(Id
));
1864 return Flag143
(Id
);
1865 end Has_Recursive_Call
;
1867 function Has_Shift_Operator
(Id
: E
) return B
is
1869 pragma Assert
(Is_Integer_Type
(Id
));
1870 return Flag267
(Base_Type
(Id
));
1871 end Has_Shift_Operator
;
1873 function Has_Size_Clause
(Id
: E
) return B
is
1876 end Has_Size_Clause
;
1878 function Has_Small_Clause
(Id
: E
) return B
is
1880 pragma Assert
(Is_Ordinary_Fixed_Point_Type
(Id
));
1882 end Has_Small_Clause
;
1884 function Has_Specified_Layout
(Id
: E
) return B
is
1886 pragma Assert
(Is_Type
(Id
));
1887 return Flag100
(Implementation_Base_Type
(Id
));
1888 end Has_Specified_Layout
;
1890 function Has_Specified_Stream_Input
(Id
: E
) return B
is
1892 pragma Assert
(Is_Type
(Id
));
1893 return Flag190
(Id
);
1894 end Has_Specified_Stream_Input
;
1896 function Has_Specified_Stream_Output
(Id
: E
) return B
is
1898 pragma Assert
(Is_Type
(Id
));
1899 return Flag191
(Id
);
1900 end Has_Specified_Stream_Output
;
1902 function Has_Specified_Stream_Read
(Id
: E
) return B
is
1904 pragma Assert
(Is_Type
(Id
));
1905 return Flag192
(Id
);
1906 end Has_Specified_Stream_Read
;
1908 function Has_Specified_Stream_Write
(Id
: E
) return B
is
1910 pragma Assert
(Is_Type
(Id
));
1911 return Flag193
(Id
);
1912 end Has_Specified_Stream_Write
;
1914 function Has_Static_Discriminants
(Id
: E
) return B
is
1916 pragma Assert
(Is_Type
(Id
));
1917 return Flag211
(Id
);
1918 end Has_Static_Discriminants
;
1920 function Has_Static_Predicate
(Id
: E
) return B
is
1922 pragma Assert
(Is_Type
(Id
));
1923 return Flag269
(Id
);
1924 end Has_Static_Predicate
;
1926 function Has_Static_Predicate_Aspect
(Id
: E
) return B
is
1928 pragma Assert
(Is_Type
(Id
));
1929 return Flag259
(Id
);
1930 end Has_Static_Predicate_Aspect
;
1932 function Has_Storage_Size_Clause
(Id
: E
) return B
is
1934 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
1935 return Flag23
(Implementation_Base_Type
(Id
));
1936 end Has_Storage_Size_Clause
;
1938 function Has_Stream_Size_Clause
(Id
: E
) return B
is
1940 return Flag184
(Id
);
1941 end Has_Stream_Size_Clause
;
1943 function Has_Task
(Id
: E
) return B
is
1945 return Flag30
(Base_Type
(Id
));
1948 function Has_Thunks
(Id
: E
) return B
is
1950 return Flag228
(Id
);
1953 function Has_Timing_Event
(Id
: E
) return B
is
1955 return Flag289
(Base_Type
(Id
));
1956 end Has_Timing_Event
;
1958 function Has_Unchecked_Union
(Id
: E
) return B
is
1960 return Flag123
(Base_Type
(Id
));
1961 end Has_Unchecked_Union
;
1963 function Has_Unknown_Discriminants
(Id
: E
) return B
is
1965 pragma Assert
(Is_Type
(Id
));
1967 end Has_Unknown_Discriminants
;
1969 function Has_Visible_Refinement
(Id
: E
) return B
is
1971 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
1972 return Flag263
(Id
);
1973 end Has_Visible_Refinement
;
1975 function Has_Volatile_Components
(Id
: E
) return B
is
1977 return Flag87
(Implementation_Base_Type
(Id
));
1978 end Has_Volatile_Components
;
1980 function Has_Xref_Entry
(Id
: E
) return B
is
1982 return Flag182
(Id
);
1985 function Hiding_Loop_Variable
(Id
: E
) return E
is
1987 pragma Assert
(Ekind
(Id
) = E_Variable
);
1989 end Hiding_Loop_Variable
;
1991 function Homonym
(Id
: E
) return E
is
1996 function Ignore_SPARK_Mode_Pragmas
(Id
: E
) return B
is
1999 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent variants
2004 Ekind_In
(Id
, E_Entry
, -- overloadable variants
2008 E_Generic_Procedure
,
2013 Ekind_In
(Id
, E_Generic_Package
, -- package variants
2016 return Flag301
(Id
);
2017 end Ignore_SPARK_Mode_Pragmas
;
2019 function Import_Pragma
(Id
: E
) return E
is
2021 pragma Assert
(Is_Subprogram
(Id
));
2025 function Incomplete_Actuals
(Id
: E
) return L
is
2027 pragma Assert
(Ekind
(Id
) = E_Package
);
2028 return Elist24
(Id
);
2029 end Incomplete_Actuals
;
2031 function Interface_Alias
(Id
: E
) return E
is
2033 pragma Assert
(Is_Subprogram
(Id
));
2035 end Interface_Alias
;
2037 function Interfaces
(Id
: E
) return L
is
2039 pragma Assert
(Is_Record_Type
(Id
));
2040 return Elist25
(Id
);
2043 function In_Package_Body
(Id
: E
) return B
is
2046 end In_Package_Body
;
2048 function In_Private_Part
(Id
: E
) return B
is
2051 end In_Private_Part
;
2053 function In_Use
(Id
: E
) return B
is
2055 pragma Assert
(Nkind
(Id
) in N_Entity
);
2059 function Initialization_Statements
(Id
: E
) return N
is
2061 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2063 end Initialization_Statements
;
2065 function Inner_Instances
(Id
: E
) return L
is
2067 return Elist23
(Id
);
2068 end Inner_Instances
;
2070 function Interface_Name
(Id
: E
) return N
is
2075 function Is_Abstract_Subprogram
(Id
: E
) return B
is
2077 pragma Assert
(Is_Overloadable
(Id
));
2079 end Is_Abstract_Subprogram
;
2081 function Is_Abstract_Type
(Id
: E
) return B
is
2083 pragma Assert
(Is_Type
(Id
));
2084 return Flag146
(Id
);
2085 end Is_Abstract_Type
;
2087 function Is_Access_Constant
(Id
: E
) return B
is
2089 pragma Assert
(Is_Access_Type
(Id
));
2091 end Is_Access_Constant
;
2093 function Is_Actual_Subtype
(Id
: E
) return B
is
2095 pragma Assert
(Is_Type
(Id
));
2096 return Flag293
(Id
);
2097 end Is_Actual_Subtype
;
2099 function Is_Ada_2005_Only
(Id
: E
) return B
is
2101 return Flag185
(Id
);
2102 end Is_Ada_2005_Only
;
2104 function Is_Ada_2012_Only
(Id
: E
) return B
is
2106 return Flag199
(Id
);
2107 end Is_Ada_2012_Only
;
2109 function Is_Aliased
(Id
: E
) return B
is
2111 pragma Assert
(Nkind
(Id
) in N_Entity
);
2115 function Is_Asynchronous
(Id
: E
) return B
is
2117 pragma Assert
(Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
2119 end Is_Asynchronous
;
2121 function Is_Atomic
(Id
: E
) return B
is
2126 function Is_Bit_Packed_Array
(Id
: E
) return B
is
2128 return Flag122
(Implementation_Base_Type
(Id
));
2129 end Is_Bit_Packed_Array
;
2131 function Is_Called
(Id
: E
) return B
is
2133 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
2134 return Flag102
(Id
);
2137 function Is_Character_Type
(Id
: E
) return B
is
2140 end Is_Character_Type
;
2142 function Is_Checked_Ghost_Entity
(Id
: E
) return B
is
2144 -- Allow this attribute to appear on unanalyzed entities
2146 pragma Assert
(Nkind
(Id
) in N_Entity
2147 or else Ekind
(Id
) = E_Void
);
2148 return Flag277
(Id
);
2149 end Is_Checked_Ghost_Entity
;
2151 function Is_Child_Unit
(Id
: E
) return B
is
2156 function Is_Class_Wide_Clone
(Id
: E
) return B
is
2158 return Flag290
(Id
);
2159 end Is_Class_Wide_Clone
;
2161 function Is_Class_Wide_Equivalent_Type
(Id
: E
) return B
is
2164 end Is_Class_Wide_Equivalent_Type
;
2166 function Is_Compilation_Unit
(Id
: E
) return B
is
2168 return Flag149
(Id
);
2169 end Is_Compilation_Unit
;
2171 function Is_Completely_Hidden
(Id
: E
) return B
is
2173 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
2174 return Flag103
(Id
);
2175 end Is_Completely_Hidden
;
2177 function Is_Constr_Subt_For_U_Nominal
(Id
: E
) return B
is
2180 end Is_Constr_Subt_For_U_Nominal
;
2182 function Is_Constr_Subt_For_UN_Aliased
(Id
: E
) return B
is
2184 return Flag141
(Id
);
2185 end Is_Constr_Subt_For_UN_Aliased
;
2187 function Is_Constrained
(Id
: E
) return B
is
2189 pragma Assert
(Nkind
(Id
) in N_Entity
);
2193 function Is_Constructor
(Id
: E
) return B
is
2198 function Is_Controlled_Active
(Id
: E
) return B
is
2200 return Flag42
(Base_Type
(Id
));
2201 end Is_Controlled_Active
;
2203 function Is_Controlling_Formal
(Id
: E
) return B
is
2205 pragma Assert
(Is_Formal
(Id
));
2207 end Is_Controlling_Formal
;
2209 function Is_CPP_Class
(Id
: E
) return B
is
2214 function Is_DIC_Procedure
(Id
: E
) return B
is
2216 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2217 return Flag132
(Id
);
2218 end Is_DIC_Procedure
;
2220 function Is_Descendant_Of_Address
(Id
: E
) return B
is
2222 return Flag223
(Id
);
2223 end Is_Descendant_Of_Address
;
2225 function Is_Discrim_SO_Function
(Id
: E
) return B
is
2227 return Flag176
(Id
);
2228 end Is_Discrim_SO_Function
;
2230 function Is_Discriminant_Check_Function
(Id
: E
) return B
is
2232 return Flag264
(Id
);
2233 end Is_Discriminant_Check_Function
;
2235 function Is_Dispatch_Table_Entity
(Id
: E
) return B
is
2237 return Flag234
(Id
);
2238 end Is_Dispatch_Table_Entity
;
2240 function Is_Dispatching_Operation
(Id
: E
) return B
is
2242 pragma Assert
(Nkind
(Id
) in N_Entity
);
2244 end Is_Dispatching_Operation
;
2246 function Is_Elaboration_Checks_OK_Id
(Id
: E
) return B
is
2249 (Ekind_In
(Id
, E_Constant
, E_Variable
)
2250 or else Is_Entry
(Id
)
2251 or else Is_Generic_Unit
(Id
)
2252 or else Is_Subprogram
(Id
)
2253 or else Is_Task_Type
(Id
));
2254 return Flag148
(Id
);
2255 end Is_Elaboration_Checks_OK_Id
;
2257 function Is_Eliminated
(Id
: E
) return B
is
2259 return Flag124
(Id
);
2262 function Is_Entry_Formal
(Id
: E
) return B
is
2265 end Is_Entry_Formal
;
2267 function Is_Entry_Wrapper
(Id
: E
) return B
is
2269 return Flag297
(Id
);
2270 end Is_Entry_Wrapper
;
2272 function Is_Exception_Handler
(Id
: E
) return B
is
2274 pragma Assert
(Ekind
(Id
) = E_Block
);
2275 return Flag286
(Id
);
2276 end Is_Exception_Handler
;
2278 function Is_Exported
(Id
: E
) return B
is
2283 function Is_Finalized_Transient
(Id
: E
) return B
is
2285 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
2286 return Flag252
(Id
);
2287 end Is_Finalized_Transient
;
2289 function Is_First_Subtype
(Id
: E
) return B
is
2292 end Is_First_Subtype
;
2294 function Is_For_Access_Subtype
(Id
: E
) return B
is
2296 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
2297 return Flag118
(Id
);
2298 end Is_For_Access_Subtype
;
2300 function Is_Formal_Subprogram
(Id
: E
) return B
is
2302 return Flag111
(Id
);
2303 end Is_Formal_Subprogram
;
2305 function Is_Frozen
(Id
: E
) return B
is
2310 function Is_Generic_Actual_Subprogram
(Id
: E
) return B
is
2312 pragma Assert
(Ekind
(Id
) = E_Function
or else Ekind
(Id
) = E_Procedure
);
2313 return Flag274
(Id
);
2314 end Is_Generic_Actual_Subprogram
;
2316 function Is_Generic_Actual_Type
(Id
: E
) return B
is
2318 pragma Assert
(Is_Type
(Id
));
2320 end Is_Generic_Actual_Type
;
2322 function Is_Generic_Instance
(Id
: E
) return B
is
2324 return Flag130
(Id
);
2325 end Is_Generic_Instance
;
2327 function Is_Generic_Type
(Id
: E
) return B
is
2329 pragma Assert
(Nkind
(Id
) in N_Entity
);
2331 end Is_Generic_Type
;
2333 function Is_Hidden
(Id
: E
) return B
is
2338 function Is_Hidden_Non_Overridden_Subpgm
(Id
: E
) return B
is
2341 end Is_Hidden_Non_Overridden_Subpgm
;
2343 function Is_Hidden_Open_Scope
(Id
: E
) return B
is
2345 return Flag171
(Id
);
2346 end Is_Hidden_Open_Scope
;
2348 function Is_Ignored_Ghost_Entity
(Id
: E
) return B
is
2350 -- Allow this attribute to appear on unanalyzed entities
2352 pragma Assert
(Nkind
(Id
) in N_Entity
2353 or else Ekind
(Id
) = E_Void
);
2354 return Flag278
(Id
);
2355 end Is_Ignored_Ghost_Entity
;
2357 function Is_Ignored_Transient
(Id
: E
) return B
is
2359 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
2360 return Flag295
(Id
);
2361 end Is_Ignored_Transient
;
2363 function Is_Immediately_Visible
(Id
: E
) return B
is
2365 pragma Assert
(Nkind
(Id
) in N_Entity
);
2367 end Is_Immediately_Visible
;
2369 function Is_Implementation_Defined
(Id
: E
) return B
is
2371 return Flag254
(Id
);
2372 end Is_Implementation_Defined
;
2374 function Is_Imported
(Id
: E
) return B
is
2379 function Is_Independent
(Id
: E
) return B
is
2381 return Flag268
(Id
);
2384 function Is_Initial_Condition_Procedure
(Id
: E
) return B
is
2386 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2387 return Flag302
(Id
);
2388 end Is_Initial_Condition_Procedure
;
2390 function Is_Inlined
(Id
: E
) return B
is
2395 function Is_Inlined_Always
(Id
: E
) return B
is
2397 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2399 end Is_Inlined_Always
;
2401 function Is_Interface
(Id
: E
) return B
is
2403 return Flag186
(Id
);
2406 function Is_Instantiated
(Id
: E
) return B
is
2408 return Flag126
(Id
);
2409 end Is_Instantiated
;
2411 function Is_Internal
(Id
: E
) return B
is
2413 pragma Assert
(Nkind
(Id
) in N_Entity
);
2417 function Is_Interrupt_Handler
(Id
: E
) return B
is
2419 pragma Assert
(Nkind
(Id
) in N_Entity
);
2421 end Is_Interrupt_Handler
;
2423 function Is_Intrinsic_Subprogram
(Id
: E
) return B
is
2426 end Is_Intrinsic_Subprogram
;
2428 function Is_Invariant_Procedure
(Id
: E
) return B
is
2430 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2431 return Flag257
(Id
);
2432 end Is_Invariant_Procedure
;
2434 function Is_Itype
(Id
: E
) return B
is
2439 function Is_Known_Non_Null
(Id
: E
) return B
is
2442 end Is_Known_Non_Null
;
2444 function Is_Known_Null
(Id
: E
) return B
is
2446 return Flag204
(Id
);
2449 function Is_Known_Valid
(Id
: E
) return B
is
2451 return Flag170
(Id
);
2454 function Is_Limited_Composite
(Id
: E
) return B
is
2456 return Flag106
(Id
);
2457 end Is_Limited_Composite
;
2459 function Is_Limited_Interface
(Id
: E
) return B
is
2461 return Flag197
(Id
);
2462 end Is_Limited_Interface
;
2464 function Is_Limited_Record
(Id
: E
) return B
is
2467 end Is_Limited_Record
;
2469 function Is_Local_Anonymous_Access
(Id
: E
) return B
is
2471 pragma Assert
(Is_Access_Type
(Id
));
2472 return Flag194
(Id
);
2473 end Is_Local_Anonymous_Access
;
2475 function Is_Machine_Code_Subprogram
(Id
: E
) return B
is
2477 pragma Assert
(Is_Subprogram
(Id
));
2478 return Flag137
(Id
);
2479 end Is_Machine_Code_Subprogram
;
2481 function Is_Non_Static_Subtype
(Id
: E
) return B
is
2483 pragma Assert
(Is_Type
(Id
));
2484 return Flag109
(Id
);
2485 end Is_Non_Static_Subtype
;
2487 function Is_Null_Init_Proc
(Id
: E
) return B
is
2489 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2490 return Flag178
(Id
);
2491 end Is_Null_Init_Proc
;
2493 function Is_Obsolescent
(Id
: E
) return B
is
2495 return Flag153
(Id
);
2498 function Is_Only_Out_Parameter
(Id
: E
) return B
is
2500 pragma Assert
(Is_Formal
(Id
));
2501 return Flag226
(Id
);
2502 end Is_Only_Out_Parameter
;
2504 function Is_Package_Body_Entity
(Id
: E
) return B
is
2506 return Flag160
(Id
);
2507 end Is_Package_Body_Entity
;
2509 function Is_Packed
(Id
: E
) return B
is
2511 return Flag51
(Implementation_Base_Type
(Id
));
2514 function Is_Packed_Array_Impl_Type
(Id
: E
) return B
is
2516 return Flag138
(Id
);
2517 end Is_Packed_Array_Impl_Type
;
2519 function Is_Param_Block_Component_Type
(Id
: E
) return B
is
2521 pragma Assert
(Is_Access_Type
(Id
));
2522 return Flag215
(Base_Type
(Id
));
2523 end Is_Param_Block_Component_Type
;
2525 function Is_Partial_Invariant_Procedure
(Id
: E
) return B
is
2527 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2528 return Flag292
(Id
);
2529 end Is_Partial_Invariant_Procedure
;
2531 function Is_Potentially_Use_Visible
(Id
: E
) return B
is
2533 pragma Assert
(Nkind
(Id
) in N_Entity
);
2535 end Is_Potentially_Use_Visible
;
2537 function Is_Predicate_Function
(Id
: E
) return B
is
2539 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2540 return Flag255
(Id
);
2541 end Is_Predicate_Function
;
2543 function Is_Predicate_Function_M
(Id
: E
) return B
is
2545 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2546 return Flag256
(Id
);
2547 end Is_Predicate_Function_M
;
2549 function Is_Preelaborated
(Id
: E
) return B
is
2552 end Is_Preelaborated
;
2554 function Is_Primitive
(Id
: E
) return B
is
2557 (Is_Overloadable
(Id
)
2558 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
2559 return Flag218
(Id
);
2562 function Is_Primitive_Wrapper
(Id
: E
) return B
is
2564 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2565 return Flag195
(Id
);
2566 end Is_Primitive_Wrapper
;
2568 function Is_Private_Composite
(Id
: E
) return B
is
2570 pragma Assert
(Is_Type
(Id
));
2571 return Flag107
(Id
);
2572 end Is_Private_Composite
;
2574 function Is_Private_Descendant
(Id
: E
) return B
is
2577 end Is_Private_Descendant
;
2579 function Is_Private_Primitive
(Id
: E
) return B
is
2581 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
2582 return Flag245
(Id
);
2583 end Is_Private_Primitive
;
2585 function Is_Public
(Id
: E
) return B
is
2587 pragma Assert
(Nkind
(Id
) in N_Entity
);
2591 function Is_Pure
(Id
: E
) return B
is
2596 function Is_Pure_Unit_Access_Type
(Id
: E
) return B
is
2598 pragma Assert
(Is_Access_Type
(Id
));
2599 return Flag189
(Id
);
2600 end Is_Pure_Unit_Access_Type
;
2602 function Is_RACW_Stub_Type
(Id
: E
) return B
is
2604 pragma Assert
(Is_Type
(Id
));
2605 return Flag244
(Id
);
2606 end Is_RACW_Stub_Type
;
2608 function Is_Raised
(Id
: E
) return B
is
2610 pragma Assert
(Ekind
(Id
) = E_Exception
);
2611 return Flag224
(Id
);
2614 function Is_Remote_Call_Interface
(Id
: E
) return B
is
2617 end Is_Remote_Call_Interface
;
2619 function Is_Remote_Types
(Id
: E
) return B
is
2622 end Is_Remote_Types
;
2624 function Is_Renaming_Of_Object
(Id
: E
) return B
is
2626 return Flag112
(Id
);
2627 end Is_Renaming_Of_Object
;
2629 function Is_Return_Object
(Id
: E
) return B
is
2631 return Flag209
(Id
);
2632 end Is_Return_Object
;
2634 function Is_Safe_To_Reevaluate
(Id
: E
) return B
is
2636 return Flag249
(Id
);
2637 end Is_Safe_To_Reevaluate
;
2639 function Is_Shared_Passive
(Id
: E
) return B
is
2642 end Is_Shared_Passive
;
2644 function Is_Static_Type
(Id
: E
) return B
is
2646 return Flag281
(Id
);
2649 function Is_Statically_Allocated
(Id
: E
) return B
is
2652 end Is_Statically_Allocated
;
2654 function Is_Tag
(Id
: E
) return B
is
2656 pragma Assert
(Nkind
(Id
) in N_Entity
);
2660 function Is_Tagged_Type
(Id
: E
) return B
is
2665 function Is_Thunk
(Id
: E
) return B
is
2667 return Flag225
(Id
);
2670 function Is_Trivial_Subprogram
(Id
: E
) return B
is
2672 return Flag235
(Id
);
2673 end Is_Trivial_Subprogram
;
2675 function Is_True_Constant
(Id
: E
) return B
is
2677 return Flag163
(Id
);
2678 end Is_True_Constant
;
2680 function Is_Unchecked_Union
(Id
: E
) return B
is
2682 return Flag117
(Implementation_Base_Type
(Id
));
2683 end Is_Unchecked_Union
;
2685 function Is_Underlying_Full_View
(Id
: E
) return B
is
2687 return Flag298
(Id
);
2688 end Is_Underlying_Full_View
;
2690 function Is_Underlying_Record_View
(Id
: E
) return B
is
2692 return Flag246
(Id
);
2693 end Is_Underlying_Record_View
;
2695 function Is_Unimplemented
(Id
: E
) return B
is
2697 return Flag284
(Id
);
2698 end Is_Unimplemented
;
2700 function Is_Unsigned_Type
(Id
: E
) return B
is
2702 pragma Assert
(Is_Type
(Id
));
2703 return Flag144
(Id
);
2704 end Is_Unsigned_Type
;
2706 function Is_Uplevel_Referenced_Entity
(Id
: E
) return B
is
2708 return Flag283
(Id
);
2709 end Is_Uplevel_Referenced_Entity
;
2711 function Is_Valued_Procedure
(Id
: E
) return B
is
2713 pragma Assert
(Ekind
(Id
) = E_Procedure
);
2714 return Flag127
(Id
);
2715 end Is_Valued_Procedure
;
2717 function Is_Visible_Formal
(Id
: E
) return B
is
2719 return Flag206
(Id
);
2720 end Is_Visible_Formal
;
2722 function Is_Visible_Lib_Unit
(Id
: E
) return B
is
2724 return Flag116
(Id
);
2725 end Is_Visible_Lib_Unit
;
2727 function Is_Volatile
(Id
: E
) return B
is
2729 pragma Assert
(Nkind
(Id
) in N_Entity
);
2731 if Is_Type
(Id
) then
2732 return Flag16
(Base_Type
(Id
));
2738 function Is_Volatile_Full_Access
(Id
: E
) return B
is
2740 return Flag285
(Id
);
2741 end Is_Volatile_Full_Access
;
2743 function Itype_Printed
(Id
: E
) return B
is
2745 pragma Assert
(Is_Itype
(Id
));
2746 return Flag202
(Id
);
2749 function Kill_Elaboration_Checks
(Id
: E
) return B
is
2752 end Kill_Elaboration_Checks
;
2754 function Kill_Range_Checks
(Id
: E
) return B
is
2757 end Kill_Range_Checks
;
2759 function Known_To_Have_Preelab_Init
(Id
: E
) return B
is
2761 pragma Assert
(Is_Type
(Id
));
2762 return Flag207
(Id
);
2763 end Known_To_Have_Preelab_Init
;
2765 function Last_Aggregate_Assignment
(Id
: E
) return N
is
2767 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
2769 end Last_Aggregate_Assignment
;
2771 function Last_Assignment
(Id
: E
) return N
is
2773 pragma Assert
(Is_Assignable
(Id
));
2775 end Last_Assignment
;
2777 function Last_Entity
(Id
: E
) return E
is
2782 function Limited_View
(Id
: E
) return E
is
2784 pragma Assert
(Ekind
(Id
) = E_Package
);
2788 function Linker_Section_Pragma
(Id
: E
) return N
is
2791 (Is_Object
(Id
) or else Is_Subprogram
(Id
) or else Is_Type
(Id
));
2793 end Linker_Section_Pragma
;
2795 function Lit_Indexes
(Id
: E
) return E
is
2797 pragma Assert
(Is_Enumeration_Type
(Id
));
2801 function Lit_Strings
(Id
: E
) return E
is
2803 pragma Assert
(Is_Enumeration_Type
(Id
));
2807 function Low_Bound_Tested
(Id
: E
) return B
is
2809 return Flag205
(Id
);
2810 end Low_Bound_Tested
;
2812 function Machine_Radix_10
(Id
: E
) return B
is
2814 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
2816 end Machine_Radix_10
;
2818 function Master_Id
(Id
: E
) return E
is
2820 pragma Assert
(Is_Access_Type
(Id
));
2824 function Materialize_Entity
(Id
: E
) return B
is
2826 return Flag168
(Id
);
2827 end Materialize_Entity
;
2829 function May_Inherit_Delayed_Rep_Aspects
(Id
: E
) return B
is
2831 return Flag262
(Id
);
2832 end May_Inherit_Delayed_Rep_Aspects
;
2834 function Mechanism
(Id
: E
) return M
is
2836 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
2837 return UI_To_Int
(Uint8
(Id
));
2840 function Modulus
(Id
: E
) return Uint
is
2842 pragma Assert
(Is_Modular_Integer_Type
(Id
));
2843 return Uint17
(Base_Type
(Id
));
2846 function Must_Be_On_Byte_Boundary
(Id
: E
) return B
is
2848 pragma Assert
(Is_Type
(Id
));
2849 return Flag183
(Id
);
2850 end Must_Be_On_Byte_Boundary
;
2852 function Must_Have_Preelab_Init
(Id
: E
) return B
is
2854 pragma Assert
(Is_Type
(Id
));
2855 return Flag208
(Id
);
2856 end Must_Have_Preelab_Init
;
2858 function Needs_Debug_Info
(Id
: E
) return B
is
2860 return Flag147
(Id
);
2861 end Needs_Debug_Info
;
2863 function Needs_No_Actuals
(Id
: E
) return B
is
2866 (Is_Overloadable
(Id
)
2867 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
2869 end Needs_No_Actuals
;
2871 function Nested_Scenarios
(Id
: E
) return L
is
2873 pragma Assert
(Ekind_In
(Id
, E_Function
,
2875 E_Subprogram_Body
));
2876 return Elist36
(Id
);
2877 end Nested_Scenarios
;
2879 function Never_Set_In_Source
(Id
: E
) return B
is
2881 return Flag115
(Id
);
2882 end Never_Set_In_Source
;
2884 function Next_Inlined_Subprogram
(Id
: E
) return E
is
2887 end Next_Inlined_Subprogram
;
2889 function No_Dynamic_Predicate_On_Actual
(Id
: E
) return Boolean is
2891 pragma Assert
(Is_Discrete_Type
(Id
));
2892 return Flag276
(Id
);
2893 end No_Dynamic_Predicate_On_Actual
;
2895 function No_Pool_Assigned
(Id
: E
) return B
is
2897 pragma Assert
(Is_Access_Type
(Id
));
2898 return Flag131
(Root_Type
(Id
));
2899 end No_Pool_Assigned
;
2901 function No_Predicate_On_Actual
(Id
: E
) return Boolean is
2903 pragma Assert
(Is_Discrete_Type
(Id
));
2904 return Flag275
(Id
);
2905 end No_Predicate_On_Actual
;
2907 function No_Reordering
(Id
: E
) return B
is
2909 pragma Assert
(Is_Record_Type
(Id
));
2910 return Flag239
(Implementation_Base_Type
(Id
));
2913 function No_Return
(Id
: E
) return B
is
2915 return Flag113
(Id
);
2918 function No_Strict_Aliasing
(Id
: E
) return B
is
2920 pragma Assert
(Is_Access_Type
(Id
));
2921 return Flag136
(Base_Type
(Id
));
2922 end No_Strict_Aliasing
;
2924 function No_Tagged_Streams_Pragma
(Id
: E
) return N
is
2926 pragma Assert
(Is_Tagged_Type
(Id
));
2928 end No_Tagged_Streams_Pragma
;
2930 function Non_Binary_Modulus
(Id
: E
) return B
is
2932 pragma Assert
(Is_Type
(Id
));
2933 return Flag58
(Base_Type
(Id
));
2934 end Non_Binary_Modulus
;
2936 function Non_Limited_View
(Id
: E
) return E
is
2939 (Ekind
(Id
) in Incomplete_Kind
2941 Ekind
(Id
) in Class_Wide_Kind
2943 Ekind
(Id
) = E_Abstract_State
);
2945 end Non_Limited_View
;
2947 function Nonzero_Is_True
(Id
: E
) return B
is
2949 pragma Assert
(Root_Type
(Id
) = Standard_Boolean
);
2950 return Flag162
(Base_Type
(Id
));
2951 end Nonzero_Is_True
;
2953 function Normalized_First_Bit
(Id
: E
) return U
is
2955 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2957 end Normalized_First_Bit
;
2959 function Normalized_Position
(Id
: E
) return U
is
2961 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2963 end Normalized_Position
;
2965 function Normalized_Position_Max
(Id
: E
) return U
is
2967 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
2969 end Normalized_Position_Max
;
2971 function OK_To_Rename
(Id
: E
) return B
is
2973 pragma Assert
(Ekind
(Id
) = E_Variable
);
2974 return Flag247
(Id
);
2977 function Optimize_Alignment_Space
(Id
: E
) return B
is
2980 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2981 return Flag241
(Id
);
2982 end Optimize_Alignment_Space
;
2984 function Optimize_Alignment_Time
(Id
: E
) return B
is
2987 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
2988 return Flag242
(Id
);
2989 end Optimize_Alignment_Time
;
2991 function Original_Access_Type
(Id
: E
) return E
is
2993 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
2995 end Original_Access_Type
;
2997 function Original_Array_Type
(Id
: E
) return E
is
2999 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
3001 end Original_Array_Type
;
3003 function Original_Protected_Subprogram
(Id
: E
) return N
is
3006 end Original_Protected_Subprogram
;
3008 function Original_Record_Component
(Id
: E
) return E
is
3010 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
3012 end Original_Record_Component
;
3014 function Overlays_Constant
(Id
: E
) return B
is
3016 return Flag243
(Id
);
3017 end Overlays_Constant
;
3019 function Overridden_Operation
(Id
: E
) return E
is
3021 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
3023 end Overridden_Operation
;
3025 function Package_Instantiation
(Id
: E
) return N
is
3027 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3029 end Package_Instantiation
;
3031 function Packed_Array_Impl_Type
(Id
: E
) return E
is
3033 pragma Assert
(Is_Array_Type
(Id
));
3035 end Packed_Array_Impl_Type
;
3037 function Parent_Subtype
(Id
: E
) return E
is
3039 pragma Assert
(Is_Record_Type
(Id
));
3040 return Node19
(Base_Type
(Id
));
3043 function Part_Of_Constituents
(Id
: E
) return L
is
3045 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Variable
));
3046 return Elist10
(Id
);
3047 end Part_Of_Constituents
;
3049 function Part_Of_References
(Id
: E
) return L
is
3051 pragma Assert
(Ekind
(Id
) = E_Variable
);
3052 return Elist11
(Id
);
3053 end Part_Of_References
;
3055 function Partial_View_Has_Unknown_Discr
(Id
: E
) return B
is
3057 pragma Assert
(Is_Type
(Id
));
3058 return Flag280
(Id
);
3059 end Partial_View_Has_Unknown_Discr
;
3061 function Pending_Access_Types
(Id
: E
) return L
is
3063 pragma Assert
(Is_Type
(Id
));
3064 return Elist15
(Id
);
3065 end Pending_Access_Types
;
3067 function Postconditions_Proc
(Id
: E
) return E
is
3069 pragma Assert
(Ekind_In
(Id
, E_Entry
,
3074 end Postconditions_Proc
;
3076 function Predicates_Ignored
(Id
: E
) return B
is
3078 pragma Assert
(Is_Type
(Id
));
3079 return Flag288
(Id
);
3080 end Predicates_Ignored
;
3082 function Prival
(Id
: E
) return E
is
3084 pragma Assert
(Is_Protected_Component
(Id
));
3088 function Prival_Link
(Id
: E
) return E
is
3090 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
3094 function Private_Dependents
(Id
: E
) return L
is
3096 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
3097 return Elist18
(Id
);
3098 end Private_Dependents
;
3100 function Private_View
(Id
: E
) return N
is
3102 pragma Assert
(Is_Private_Type
(Id
));
3106 function Protected_Body_Subprogram
(Id
: E
) return E
is
3108 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
3110 end Protected_Body_Subprogram
;
3112 function Protected_Formal
(Id
: E
) return E
is
3114 pragma Assert
(Is_Formal
(Id
));
3116 end Protected_Formal
;
3118 function Protected_Subprogram
(Id
: E
) return N
is
3120 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
3122 end Protected_Subprogram
;
3124 function Protection_Object
(Id
: E
) return E
is
3126 pragma Assert
(Ekind_In
(Id
, E_Entry
,
3131 end Protection_Object
;
3133 function Reachable
(Id
: E
) return B
is
3138 function Receiving_Entry
(Id
: E
) return E
is
3140 pragma Assert
(Ekind
(Id
) = E_Procedure
);
3142 end Receiving_Entry
;
3144 function Referenced
(Id
: E
) return B
is
3146 return Flag156
(Id
);
3149 function Referenced_As_LHS
(Id
: E
) return B
is
3152 end Referenced_As_LHS
;
3154 function Referenced_As_Out_Parameter
(Id
: E
) return B
is
3156 return Flag227
(Id
);
3157 end Referenced_As_Out_Parameter
;
3159 function Refinement_Constituents
(Id
: E
) return L
is
3161 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
3163 end Refinement_Constituents
;
3165 function Register_Exception_Call
(Id
: E
) return N
is
3167 pragma Assert
(Ekind
(Id
) = E_Exception
);
3169 end Register_Exception_Call
;
3171 function Related_Array_Object
(Id
: E
) return E
is
3173 pragma Assert
(Is_Array_Type
(Id
));
3175 end Related_Array_Object
;
3177 function Related_Expression
(Id
: E
) return N
is
3179 pragma Assert
(Ekind
(Id
) in Type_Kind
3180 or else Ekind_In
(Id
, E_Constant
, E_Variable
));
3182 end Related_Expression
;
3184 function Related_Instance
(Id
: E
) return E
is
3186 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
3188 end Related_Instance
;
3190 function Related_Type
(Id
: E
) return E
is
3192 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
3196 function Relative_Deadline_Variable
(Id
: E
) return E
is
3198 pragma Assert
(Is_Task_Type
(Id
));
3199 return Node28
(Implementation_Base_Type
(Id
));
3200 end Relative_Deadline_Variable
;
3202 function Renamed_Entity
(Id
: E
) return N
is
3207 function Renamed_In_Spec
(Id
: E
) return B
is
3209 pragma Assert
(Ekind
(Id
) = E_Package
);
3210 return Flag231
(Id
);
3211 end Renamed_In_Spec
;
3213 function Renamed_Object
(Id
: E
) return N
is
3218 function Renaming_Map
(Id
: E
) return U
is
3223 function Requires_Overriding
(Id
: E
) return B
is
3225 pragma Assert
(Is_Overloadable
(Id
));
3226 return Flag213
(Id
);
3227 end Requires_Overriding
;
3229 function Return_Present
(Id
: E
) return B
is
3234 function Return_Applies_To
(Id
: E
) return N
is
3237 end Return_Applies_To
;
3239 function Returns_By_Ref
(Id
: E
) return B
is
3244 function Reverse_Bit_Order
(Id
: E
) return B
is
3246 pragma Assert
(Is_Record_Type
(Id
));
3247 return Flag164
(Base_Type
(Id
));
3248 end Reverse_Bit_Order
;
3250 function Reverse_Storage_Order
(Id
: E
) return B
is
3252 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3253 return Flag93
(Base_Type
(Id
));
3254 end Reverse_Storage_Order
;
3256 function Rewritten_For_C
(Id
: E
) return B
is
3258 pragma Assert
(Ekind
(Id
) = E_Function
);
3259 return Flag287
(Id
);
3260 end Rewritten_For_C
;
3262 function RM_Size
(Id
: E
) return U
is
3264 pragma Assert
(Is_Type
(Id
));
3268 function Scalar_Range
(Id
: E
) return N
is
3273 function Scale_Value
(Id
: E
) return U
is
3278 function Scope_Depth_Value
(Id
: E
) return U
is
3281 end Scope_Depth_Value
;
3283 function Sec_Stack_Needed_For_Return
(Id
: E
) return B
is
3285 return Flag167
(Id
);
3286 end Sec_Stack_Needed_For_Return
;
3288 function Shadow_Entities
(Id
: E
) return S
is
3290 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3292 end Shadow_Entities
;
3294 function Shared_Var_Procs_Instance
(Id
: E
) return E
is
3296 pragma Assert
(Ekind
(Id
) = E_Variable
);
3298 end Shared_Var_Procs_Instance
;
3300 function Size_Check_Code
(Id
: E
) return N
is
3302 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
3304 end Size_Check_Code
;
3306 function Size_Depends_On_Discriminant
(Id
: E
) return B
is
3308 return Flag177
(Id
);
3309 end Size_Depends_On_Discriminant
;
3311 function Size_Known_At_Compile_Time
(Id
: E
) return B
is
3314 end Size_Known_At_Compile_Time
;
3316 function Small_Value
(Id
: E
) return R
is
3318 pragma Assert
(Is_Fixed_Point_Type
(Id
));
3319 return Ureal21
(Id
);
3322 function SPARK_Aux_Pragma
(Id
: E
) return N
is
3325 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent variants
3328 Ekind_In
(Id
, E_Generic_Package
, -- package variants
3332 end SPARK_Aux_Pragma
;
3334 function SPARK_Aux_Pragma_Inherited
(Id
: E
) return B
is
3337 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent variants
3340 Ekind_In
(Id
, E_Generic_Package
, -- package variants
3343 return Flag266
(Id
);
3344 end SPARK_Aux_Pragma_Inherited
;
3346 function SPARK_Pragma
(Id
: E
) return N
is
3349 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent variants
3354 Ekind_In
(Id
, E_Constant
, -- object variants
3357 Ekind_In
(Id
, E_Entry
, -- overloadable variants
3361 E_Generic_Procedure
,
3366 Ekind_In
(Id
, E_Generic_Package
, -- package variants
3370 Ekind
(Id
) = E_Void
); -- special purpose
3374 function SPARK_Pragma_Inherited
(Id
: E
) return B
is
3377 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent variants
3382 Ekind_In
(Id
, E_Constant
, -- object variants
3385 Ekind_In
(Id
, E_Entry
, -- overloadable variants
3389 E_Generic_Procedure
,
3394 Ekind_In
(Id
, E_Generic_Package
, -- package variants
3398 Ekind
(Id
) = E_Void
); -- special purpose
3399 return Flag265
(Id
);
3400 end SPARK_Pragma_Inherited
;
3402 function Spec_Entity
(Id
: E
) return E
is
3404 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
3408 function SSO_Set_High_By_Default
(Id
: E
) return B
is
3410 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3411 return Flag273
(Base_Type
(Id
));
3412 end SSO_Set_High_By_Default
;
3414 function SSO_Set_Low_By_Default
(Id
: E
) return B
is
3416 pragma Assert
(Is_Record_Type
(Id
) or else Is_Array_Type
(Id
));
3417 return Flag272
(Base_Type
(Id
));
3418 end SSO_Set_Low_By_Default
;
3420 function Static_Discrete_Predicate
(Id
: E
) return S
is
3422 pragma Assert
(Is_Discrete_Type
(Id
));
3424 end Static_Discrete_Predicate
;
3426 function Static_Real_Or_String_Predicate
(Id
: E
) return N
is
3428 pragma Assert
(Is_Real_Type
(Id
) or else Is_String_Type
(Id
));
3430 end Static_Real_Or_String_Predicate
;
3432 function Status_Flag_Or_Transient_Decl
(Id
: E
) return N
is
3434 pragma Assert
(Ekind_In
(Id
, E_Constant
,
3438 end Status_Flag_Or_Transient_Decl
;
3440 function Storage_Size_Variable
(Id
: E
) return E
is
3442 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
3443 return Node26
(Implementation_Base_Type
(Id
));
3444 end Storage_Size_Variable
;
3446 function Static_Elaboration_Desired
(Id
: E
) return B
is
3448 pragma Assert
(Ekind
(Id
) = E_Package
);
3450 end Static_Elaboration_Desired
;
3452 function Static_Initialization
(Id
: E
) return N
is
3455 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
3457 end Static_Initialization
;
3459 function Stored_Constraint
(Id
: E
) return L
is
3462 (Is_Composite_Type
(Id
) and then not Is_Array_Type
(Id
));
3463 return Elist23
(Id
);
3464 end Stored_Constraint
;
3466 function Stores_Attribute_Old_Prefix
(Id
: E
) return B
is
3468 return Flag270
(Id
);
3469 end Stores_Attribute_Old_Prefix
;
3471 function Strict_Alignment
(Id
: E
) return B
is
3473 return Flag145
(Implementation_Base_Type
(Id
));
3474 end Strict_Alignment
;
3476 function String_Literal_Length
(Id
: E
) return U
is
3479 end String_Literal_Length
;
3481 function String_Literal_Low_Bound
(Id
: E
) return N
is
3484 end String_Literal_Low_Bound
;
3486 function Subprograms_For_Type
(Id
: E
) return L
is
3488 pragma Assert
(Is_Type
(Id
));
3489 return Elist29
(Id
);
3490 end Subprograms_For_Type
;
3492 function Subps_Index
(Id
: E
) return U
is
3494 pragma Assert
(Is_Subprogram
(Id
));
3498 function Suppress_Initialization
(Id
: E
) return B
is
3500 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Variable
);
3501 return Flag105
(Id
);
3502 end Suppress_Initialization
;
3504 function Suppress_Style_Checks
(Id
: E
) return B
is
3506 return Flag165
(Id
);
3507 end Suppress_Style_Checks
;
3509 function Suppress_Value_Tracking_On_Call
(Id
: E
) return B
is
3511 return Flag217
(Id
);
3512 end Suppress_Value_Tracking_On_Call
;
3514 function Task_Body_Procedure
(Id
: E
) return N
is
3516 pragma Assert
(Ekind
(Id
) in Task_Kind
);
3518 end Task_Body_Procedure
;
3520 function Thunk_Entity
(Id
: E
) return E
is
3522 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
3523 and then Is_Thunk
(Id
));
3527 function Treat_As_Volatile
(Id
: E
) return B
is
3530 end Treat_As_Volatile
;
3532 function Underlying_Full_View
(Id
: E
) return E
is
3534 pragma Assert
(Ekind
(Id
) in Private_Kind
);
3536 end Underlying_Full_View
;
3538 function Underlying_Record_View
(Id
: E
) return E
is
3541 end Underlying_Record_View
;
3543 function Universal_Aliasing
(Id
: E
) return B
is
3545 pragma Assert
(Is_Type
(Id
));
3546 return Flag216
(Implementation_Base_Type
(Id
));
3547 end Universal_Aliasing
;
3549 function Unset_Reference
(Id
: E
) return N
is
3552 end Unset_Reference
;
3554 function Used_As_Generic_Actual
(Id
: E
) return B
is
3556 return Flag222
(Id
);
3557 end Used_As_Generic_Actual
;
3559 function Uses_Lock_Free
(Id
: E
) return B
is
3561 pragma Assert
(Is_Protected_Type
(Id
));
3562 return Flag188
(Id
);
3565 function Uses_Sec_Stack
(Id
: E
) return B
is
3570 function Validated_Object
(Id
: E
) return N
is
3572 pragma Assert
(Ekind
(Id
) = E_Variable
);
3574 end Validated_Object
;
3576 function Warnings_Off
(Id
: E
) return B
is
3581 function Warnings_Off_Used
(Id
: E
) return B
is
3583 return Flag236
(Id
);
3584 end Warnings_Off_Used
;
3586 function Warnings_Off_Used_Unmodified
(Id
: E
) return B
is
3588 return Flag237
(Id
);
3589 end Warnings_Off_Used_Unmodified
;
3591 function Warnings_Off_Used_Unreferenced
(Id
: E
) return B
is
3593 return Flag238
(Id
);
3594 end Warnings_Off_Used_Unreferenced
;
3596 function Wrapped_Entity
(Id
: E
) return E
is
3598 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
3599 and then Is_Primitive_Wrapper
(Id
));
3603 function Was_Hidden
(Id
: E
) return B
is
3605 return Flag196
(Id
);
3608 ------------------------------
3609 -- Classification Functions --
3610 ------------------------------
3612 function Is_Access_Type
(Id
: E
) return B
is
3614 return Ekind
(Id
) in Access_Kind
;
3617 function Is_Access_Protected_Subprogram_Type
(Id
: E
) return B
is
3619 return Ekind
(Id
) in Access_Protected_Kind
;
3620 end Is_Access_Protected_Subprogram_Type
;
3622 function Is_Access_Subprogram_Type
(Id
: E
) return B
is
3624 return Ekind
(Id
) in Access_Subprogram_Kind
;
3625 end Is_Access_Subprogram_Type
;
3627 function Is_Aggregate_Type
(Id
: E
) return B
is
3629 return Ekind
(Id
) in Aggregate_Kind
;
3630 end Is_Aggregate_Type
;
3632 function Is_Anonymous_Access_Type
(Id
: E
) return B
is
3634 return Ekind
(Id
) in Anonymous_Access_Kind
;
3635 end Is_Anonymous_Access_Type
;
3637 function Is_Array_Type
(Id
: E
) return B
is
3639 return Ekind
(Id
) in Array_Kind
;
3642 function Is_Assignable
(Id
: E
) return B
is
3644 return Ekind
(Id
) in Assignable_Kind
;
3647 function Is_Class_Wide_Type
(Id
: E
) return B
is
3649 return Ekind
(Id
) in Class_Wide_Kind
;
3650 end Is_Class_Wide_Type
;
3652 function Is_Composite_Type
(Id
: E
) return B
is
3654 return Ekind
(Id
) in Composite_Kind
;
3655 end Is_Composite_Type
;
3657 function Is_Concurrent_Body
(Id
: E
) return B
is
3659 return Ekind
(Id
) in Concurrent_Body_Kind
;
3660 end Is_Concurrent_Body
;
3662 function Is_Concurrent_Record_Type
(Id
: E
) return B
is
3665 end Is_Concurrent_Record_Type
;
3667 function Is_Concurrent_Type
(Id
: E
) return B
is
3669 return Ekind
(Id
) in Concurrent_Kind
;
3670 end Is_Concurrent_Type
;
3672 function Is_Decimal_Fixed_Point_Type
(Id
: E
) return B
is
3674 return Ekind
(Id
) in Decimal_Fixed_Point_Kind
;
3675 end Is_Decimal_Fixed_Point_Type
;
3677 function Is_Digits_Type
(Id
: E
) return B
is
3679 return Ekind
(Id
) in Digits_Kind
;
3682 function Is_Discrete_Or_Fixed_Point_Type
(Id
: E
) return B
is
3684 return Ekind
(Id
) in Discrete_Or_Fixed_Point_Kind
;
3685 end Is_Discrete_Or_Fixed_Point_Type
;
3687 function Is_Discrete_Type
(Id
: E
) return B
is
3689 return Ekind
(Id
) in Discrete_Kind
;
3690 end Is_Discrete_Type
;
3692 function Is_Elementary_Type
(Id
: E
) return B
is
3694 return Ekind
(Id
) in Elementary_Kind
;
3695 end Is_Elementary_Type
;
3697 function Is_Entry
(Id
: E
) return B
is
3699 return Ekind
(Id
) in Entry_Kind
;
3702 function Is_Enumeration_Type
(Id
: E
) return B
is
3704 return Ekind
(Id
) in Enumeration_Kind
;
3705 end Is_Enumeration_Type
;
3707 function Is_Fixed_Point_Type
(Id
: E
) return B
is
3709 return Ekind
(Id
) in Fixed_Point_Kind
;
3710 end Is_Fixed_Point_Type
;
3712 function Is_Floating_Point_Type
(Id
: E
) return B
is
3714 return Ekind
(Id
) in Float_Kind
;
3715 end Is_Floating_Point_Type
;
3717 function Is_Formal
(Id
: E
) return B
is
3719 return Ekind
(Id
) in Formal_Kind
;
3722 function Is_Formal_Object
(Id
: E
) return B
is
3724 return Ekind
(Id
) in Formal_Object_Kind
;
3725 end Is_Formal_Object
;
3727 function Is_Generic_Subprogram
(Id
: E
) return B
is
3729 return Ekind
(Id
) in Generic_Subprogram_Kind
;
3730 end Is_Generic_Subprogram
;
3732 function Is_Generic_Unit
(Id
: E
) return B
is
3734 return Ekind
(Id
) in Generic_Unit_Kind
;
3735 end Is_Generic_Unit
;
3737 function Is_Ghost_Entity
(Id
: Entity_Id
) return Boolean is
3739 return Is_Checked_Ghost_Entity
(Id
) or else Is_Ignored_Ghost_Entity
(Id
);
3740 end Is_Ghost_Entity
;
3742 function Is_Incomplete_Or_Private_Type
(Id
: E
) return B
is
3744 return Ekind
(Id
) in Incomplete_Or_Private_Kind
;
3745 end Is_Incomplete_Or_Private_Type
;
3747 function Is_Incomplete_Type
(Id
: E
) return B
is
3749 return Ekind
(Id
) in Incomplete_Kind
;
3750 end Is_Incomplete_Type
;
3752 function Is_Integer_Type
(Id
: E
) return B
is
3754 return Ekind
(Id
) in Integer_Kind
;
3755 end Is_Integer_Type
;
3757 function Is_Modular_Integer_Type
(Id
: E
) return B
is
3759 return Ekind
(Id
) in Modular_Integer_Kind
;
3760 end Is_Modular_Integer_Type
;
3762 function Is_Named_Number
(Id
: E
) return B
is
3764 return Ekind
(Id
) in Named_Kind
;
3765 end Is_Named_Number
;
3767 function Is_Numeric_Type
(Id
: E
) return B
is
3769 return Ekind
(Id
) in Numeric_Kind
;
3770 end Is_Numeric_Type
;
3772 function Is_Object
(Id
: E
) return B
is
3774 return Ekind
(Id
) in Object_Kind
;
3777 function Is_Ordinary_Fixed_Point_Type
(Id
: E
) return B
is
3779 return Ekind
(Id
) in Ordinary_Fixed_Point_Kind
;
3780 end Is_Ordinary_Fixed_Point_Type
;
3782 function Is_Overloadable
(Id
: E
) return B
is
3784 return Ekind
(Id
) in Overloadable_Kind
;
3785 end Is_Overloadable
;
3787 function Is_Private_Type
(Id
: E
) return B
is
3789 return Ekind
(Id
) in Private_Kind
;
3790 end Is_Private_Type
;
3792 function Is_Protected_Type
(Id
: E
) return B
is
3794 return Ekind
(Id
) in Protected_Kind
;
3795 end Is_Protected_Type
;
3797 function Is_Real_Type
(Id
: E
) return B
is
3799 return Ekind
(Id
) in Real_Kind
;
3802 function Is_Record_Type
(Id
: E
) return B
is
3804 return Ekind
(Id
) in Record_Kind
;
3807 function Is_Scalar_Type
(Id
: E
) return B
is
3809 return Ekind
(Id
) in Scalar_Kind
;
3812 function Is_Signed_Integer_Type
(Id
: E
) return B
is
3814 return Ekind
(Id
) in Signed_Integer_Kind
;
3815 end Is_Signed_Integer_Type
;
3817 function Is_Subprogram
(Id
: E
) return B
is
3819 return Ekind
(Id
) in Subprogram_Kind
;
3822 function Is_Subprogram_Or_Entry
(Id
: E
) return B
is
3824 return Ekind
(Id
) in Subprogram_Kind
3826 Ekind
(Id
) in Entry_Kind
;
3827 end Is_Subprogram_Or_Entry
;
3829 function Is_Subprogram_Or_Generic_Subprogram
(Id
: E
) return B
is
3831 return Ekind
(Id
) in Subprogram_Kind
3833 Ekind
(Id
) in Generic_Subprogram_Kind
;
3834 end Is_Subprogram_Or_Generic_Subprogram
;
3836 function Is_Task_Type
(Id
: E
) return B
is
3838 return Ekind
(Id
) in Task_Kind
;
3841 function Is_Type
(Id
: E
) return B
is
3843 return Ekind
(Id
) in Type_Kind
;
3846 ------------------------------
3847 -- Attribute Set Procedures --
3848 ------------------------------
3850 -- Note: in many of these set procedures an "obvious" assertion is missing.
3851 -- The reason for this is that in many cases, a field is set before the
3852 -- Ekind field is set, so that the field is set when Ekind = E_Void. It
3853 -- it is possible to add assertions that specifically include the E_Void
3854 -- possibility, but in some cases, we just omit the assertions.
3856 procedure Set_Abstract_States
(Id
: E
; V
: L
) is
3858 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
3859 Set_Elist25
(Id
, V
);
3860 end Set_Abstract_States
;
3862 procedure Set_Accept_Address
(Id
: E
; V
: L
) is
3864 Set_Elist21
(Id
, V
);
3865 end Set_Accept_Address
;
3867 procedure Set_Access_Disp_Table
(Id
: E
; V
: L
) is
3869 pragma Assert
(Ekind
(Id
) = E_Record_Type
3870 and then Id
= Implementation_Base_Type
(Id
));
3871 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
3872 Set_Elist16
(Id
, V
);
3873 end Set_Access_Disp_Table
;
3875 procedure Set_Access_Disp_Table_Elab_Flag
(Id
: E
; V
: E
) is
3877 pragma Assert
(Ekind
(Id
) = E_Record_Type
3878 and then Id
= Implementation_Base_Type
(Id
));
3879 pragma Assert
(Is_Tagged_Type
(Id
));
3881 end Set_Access_Disp_Table_Elab_Flag
;
3883 procedure Set_Anonymous_Designated_Type
(Id
: E
; V
: E
) is
3885 pragma Assert
(Ekind
(Id
) = E_Variable
);
3887 end Set_Anonymous_Designated_Type
;
3889 procedure Set_Anonymous_Masters
(Id
: E
; V
: L
) is
3891 pragma Assert
(Ekind_In
(Id
, E_Function
,
3894 E_Subprogram_Body
));
3895 Set_Elist29
(Id
, V
);
3896 end Set_Anonymous_Masters
;
3898 procedure Set_Anonymous_Object
(Id
: E
; V
: E
) is
3900 pragma Assert
(Ekind_In
(Id
, E_Protected_Type
, E_Task_Type
));
3902 end Set_Anonymous_Object
;
3904 procedure Set_Associated_Entity
(Id
: E
; V
: E
) is
3907 end Set_Associated_Entity
;
3909 procedure Set_Associated_Formal_Package
(Id
: E
; V
: E
) is
3912 end Set_Associated_Formal_Package
;
3914 procedure Set_Associated_Node_For_Itype
(Id
: E
; V
: E
) is
3917 end Set_Associated_Node_For_Itype
;
3919 procedure Set_Associated_Storage_Pool
(Id
: E
; V
: E
) is
3921 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
3923 end Set_Associated_Storage_Pool
;
3925 procedure Set_Activation_Record_Component
(Id
: E
; V
: E
) is
3927 pragma Assert
(Ekind_In
(Id
, E_Constant
,
3934 end Set_Activation_Record_Component
;
3936 procedure Set_Actual_Subtype
(Id
: E
; V
: E
) is
3939 (Ekind_In
(Id
, E_Constant
, E_Variable
, E_Generic_In_Out_Parameter
)
3940 or else Is_Formal
(Id
));
3942 end Set_Actual_Subtype
;
3944 procedure Set_Address_Taken
(Id
: E
; V
: B
:= True) is
3946 Set_Flag104
(Id
, V
);
3947 end Set_Address_Taken
;
3949 procedure Set_Alias
(Id
: E
; V
: E
) is
3952 (Is_Overloadable
(Id
) or else Ekind
(Id
) = E_Subprogram_Type
);
3956 procedure Set_Alignment
(Id
: E
; V
: U
) is
3958 pragma Assert
(Is_Type
(Id
)
3959 or else Is_Formal
(Id
)
3960 or else Ekind_In
(Id
, E_Loop_Parameter
,
3967 procedure Set_Barrier_Function
(Id
: E
; V
: N
) is
3969 pragma Assert
(Is_Entry
(Id
));
3971 end Set_Barrier_Function
;
3973 procedure Set_Block_Node
(Id
: E
; V
: N
) is
3975 pragma Assert
(Ekind
(Id
) = E_Block
);
3979 procedure Set_Body_Entity
(Id
: E
; V
: E
) is
3981 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
3983 end Set_Body_Entity
;
3985 procedure Set_Body_Needed_For_Inlining
(Id
: E
; V
: B
:= True) is
3987 pragma Assert
(Ekind
(Id
) = E_Package
);
3988 Set_Flag299
(Id
, V
);
3989 end Set_Body_Needed_For_Inlining
;
3991 procedure Set_Body_Needed_For_SAL
(Id
: E
; V
: B
:= True) is
3994 (Ekind
(Id
) = E_Package
3995 or else Is_Subprogram
(Id
)
3996 or else Is_Generic_Unit
(Id
));
3998 end Set_Body_Needed_For_SAL
;
4000 procedure Set_Body_References
(Id
: E
; V
: L
) is
4002 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4003 Set_Elist16
(Id
, V
);
4004 end Set_Body_References
;
4006 procedure Set_BIP_Initialization_Call
(Id
: E
; V
: N
) is
4008 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
4010 end Set_BIP_Initialization_Call
;
4012 procedure Set_C_Pass_By_Copy
(Id
: E
; V
: B
:= True) is
4014 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
4015 Set_Flag125
(Id
, V
);
4016 end Set_C_Pass_By_Copy
;
4018 procedure Set_Can_Never_Be_Null
(Id
: E
; V
: B
:= True) is
4021 end Set_Can_Never_Be_Null
;
4023 procedure Set_Can_Use_Internal_Rep
(Id
: E
; V
: B
:= True) is
4026 (Is_Access_Subprogram_Type
(Id
) and then Is_Base_Type
(Id
));
4027 Set_Flag229
(Id
, V
);
4028 end Set_Can_Use_Internal_Rep
;
4030 procedure Set_Checks_May_Be_Suppressed
(Id
: E
; V
: B
:= True) is
4033 end Set_Checks_May_Be_Suppressed
;
4035 procedure Set_Class_Wide_Clone
(Id
: E
; V
: E
) is
4037 pragma Assert
(Is_Subprogram
(Id
));
4039 end Set_Class_Wide_Clone
;
4041 procedure Set_Class_Wide_Type
(Id
: E
; V
: E
) is
4043 pragma Assert
(Is_Type
(Id
));
4045 end Set_Class_Wide_Type
;
4047 procedure Set_Cloned_Subtype
(Id
: E
; V
: E
) is
4049 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Class_Wide_Subtype
));
4051 end Set_Cloned_Subtype
;
4053 procedure Set_Component_Bit_Offset
(Id
: E
; V
: U
) is
4055 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4057 end Set_Component_Bit_Offset
;
4059 procedure Set_Component_Clause
(Id
: E
; V
: N
) is
4061 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4063 end Set_Component_Clause
;
4065 procedure Set_Component_Size
(Id
: E
; V
: U
) is
4067 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4069 end Set_Component_Size
;
4071 procedure Set_Component_Type
(Id
: E
; V
: E
) is
4073 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4075 end Set_Component_Type
;
4077 procedure Set_Contains_Ignored_Ghost_Code
(Id
: E
; V
: B
:= True) is
4080 (Ekind_In
(Id
, E_Block
,
4084 E_Generic_Procedure
,
4088 E_Subprogram_Body
));
4089 Set_Flag279
(Id
, V
);
4090 end Set_Contains_Ignored_Ghost_Code
;
4092 procedure Set_Contract
(Id
: E
; V
: N
) is
4095 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent variants
4099 Ekind_In
(Id
, E_Constant
, -- object variants
4102 Ekind_In
(Id
, E_Entry
, -- overloadable variants
4106 E_Generic_Procedure
,
4111 Ekind_In
(Id
, E_Generic_Package
, -- package variants
4115 Ekind
(Id
) = E_Void
); -- special purpose
4119 procedure Set_Contract_Wrapper
(Id
: E
; V
: E
) is
4121 pragma Assert
(Ekind_In
(Id
, E_Entry
, E_Entry_Family
));
4123 end Set_Contract_Wrapper
;
4125 procedure Set_Corresponding_Concurrent_Type
(Id
: E
; V
: E
) is
4128 (Ekind
(Id
) = E_Record_Type
and then Is_Concurrent_Type
(V
));
4130 end Set_Corresponding_Concurrent_Type
;
4132 procedure Set_Corresponding_Discriminant
(Id
: E
; V
: E
) is
4134 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4136 end Set_Corresponding_Discriminant
;
4138 procedure Set_Corresponding_Equality
(Id
: E
; V
: E
) is
4141 (Ekind
(Id
) = E_Function
4142 and then not Comes_From_Source
(Id
)
4143 and then Chars
(Id
) = Name_Op_Ne
);
4145 end Set_Corresponding_Equality
;
4147 procedure Set_Corresponding_Function
(Id
: E
; V
: E
) is
4149 pragma Assert
(Ekind
(Id
) = E_Procedure
and then Rewritten_For_C
(V
));
4151 end Set_Corresponding_Function
;
4153 procedure Set_Corresponding_Procedure
(Id
: E
; V
: E
) is
4155 pragma Assert
(Ekind
(Id
) = E_Function
and then Rewritten_For_C
(Id
));
4157 end Set_Corresponding_Procedure
;
4159 procedure Set_Corresponding_Protected_Entry
(Id
: E
; V
: E
) is
4161 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Subprogram_Body
));
4163 end Set_Corresponding_Protected_Entry
;
4165 procedure Set_Corresponding_Record_Component
(Id
: E
; V
: E
) is
4167 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
4169 end Set_Corresponding_Record_Component
;
4171 procedure Set_Corresponding_Record_Type
(Id
: E
; V
: E
) is
4173 pragma Assert
(Is_Concurrent_Type
(Id
));
4175 end Set_Corresponding_Record_Type
;
4177 procedure Set_Corresponding_Remote_Type
(Id
: E
; V
: E
) is
4180 end Set_Corresponding_Remote_Type
;
4182 procedure Set_Current_Use_Clause
(Id
: E
; V
: E
) is
4184 pragma Assert
(Ekind
(Id
) = E_Package
or else Is_Type
(Id
));
4186 end Set_Current_Use_Clause
;
4188 procedure Set_Current_Value
(Id
: E
; V
: N
) is
4190 pragma Assert
(Ekind
(Id
) in Object_Kind
or else Ekind
(Id
) = E_Void
);
4192 end Set_Current_Value
;
4194 procedure Set_CR_Discriminant
(Id
: E
; V
: E
) is
4197 end Set_CR_Discriminant
;
4199 procedure Set_Debug_Info_Off
(Id
: E
; V
: B
:= True) is
4201 Set_Flag166
(Id
, V
);
4202 end Set_Debug_Info_Off
;
4204 procedure Set_Debug_Renaming_Link
(Id
: E
; V
: E
) is
4207 end Set_Debug_Renaming_Link
;
4209 procedure Set_Default_Aspect_Component_Value
(Id
: E
; V
: E
) is
4211 pragma Assert
(Is_Array_Type
(Id
) and then Is_Base_Type
(Id
));
4213 end Set_Default_Aspect_Component_Value
;
4215 procedure Set_Default_Aspect_Value
(Id
: E
; V
: E
) is
4217 pragma Assert
(Is_Scalar_Type
(Id
) and then Is_Base_Type
(Id
));
4219 end Set_Default_Aspect_Value
;
4221 procedure Set_Default_Expr_Function
(Id
: E
; V
: E
) is
4223 pragma Assert
(Is_Formal
(Id
));
4225 end Set_Default_Expr_Function
;
4227 procedure Set_Default_Expressions_Processed
(Id
: E
; V
: B
:= True) is
4229 Set_Flag108
(Id
, V
);
4230 end Set_Default_Expressions_Processed
;
4232 procedure Set_Default_Value
(Id
: E
; V
: N
) is
4234 pragma Assert
(Is_Formal
(Id
));
4236 end Set_Default_Value
;
4238 procedure Set_Delay_Cleanups
(Id
: E
; V
: B
:= True) is
4242 or else Is_Task_Type
(Id
)
4243 or else Ekind
(Id
) = E_Block
);
4244 Set_Flag114
(Id
, V
);
4245 end Set_Delay_Cleanups
;
4247 procedure Set_Delay_Subprogram_Descriptors
(Id
: E
; V
: B
:= True) is
4250 (Is_Subprogram
(Id
) or else Ekind_In
(Id
, E_Package
, E_Package_Body
));
4253 end Set_Delay_Subprogram_Descriptors
;
4255 procedure Set_Delta_Value
(Id
: E
; V
: R
) is
4257 pragma Assert
(Is_Fixed_Point_Type
(Id
));
4258 Set_Ureal18
(Id
, V
);
4259 end Set_Delta_Value
;
4261 procedure Set_Dependent_Instances
(Id
: E
; V
: L
) is
4263 pragma Assert
(Is_Generic_Instance
(Id
));
4265 end Set_Dependent_Instances
;
4267 procedure Set_Depends_On_Private
(Id
: E
; V
: B
:= True) is
4269 pragma Assert
(Nkind
(Id
) in N_Entity
);
4271 end Set_Depends_On_Private
;
4273 procedure Set_Derived_Type_Link
(Id
: E
; V
: E
) is
4275 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4277 end Set_Derived_Type_Link
;
4279 procedure Set_Digits_Value
(Id
: E
; V
: U
) is
4282 (Is_Floating_Point_Type
(Id
)
4283 or else Is_Decimal_Fixed_Point_Type
(Id
));
4285 end Set_Digits_Value
;
4287 procedure Set_Directly_Designated_Type
(Id
: E
; V
: E
) is
4290 end Set_Directly_Designated_Type
;
4292 procedure Set_Disable_Controlled
(Id
: E
; V
: B
:= True) is
4294 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4295 Set_Flag253
(Id
, V
);
4296 end Set_Disable_Controlled
;
4298 procedure Set_Discard_Names
(Id
: E
; V
: B
:= True) is
4301 end Set_Discard_Names
;
4303 procedure Set_Discriminal
(Id
: E
; V
: E
) is
4305 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
4307 end Set_Discriminal
;
4309 procedure Set_Discriminal_Link
(Id
: E
; V
: E
) is
4312 end Set_Discriminal_Link
;
4314 procedure Set_Discriminant_Checking_Func
(Id
: E
; V
: E
) is
4316 pragma Assert
(Ekind
(Id
) = E_Component
);
4318 end Set_Discriminant_Checking_Func
;
4320 procedure Set_Discriminant_Constraint
(Id
: E
; V
: L
) is
4322 pragma Assert
(Nkind
(Id
) in N_Entity
);
4323 Set_Elist21
(Id
, V
);
4324 end Set_Discriminant_Constraint
;
4326 procedure Set_Discriminant_Default_Value
(Id
: E
; V
: N
) is
4329 end Set_Discriminant_Default_Value
;
4331 procedure Set_Discriminant_Number
(Id
: E
; V
: U
) is
4334 end Set_Discriminant_Number
;
4336 procedure Set_Dispatch_Table_Wrappers
(Id
: E
; V
: L
) is
4338 pragma Assert
(Ekind
(Id
) = E_Record_Type
4339 and then Id
= Implementation_Base_Type
(Id
));
4340 pragma Assert
(V
= No_Elist
or else Is_Tagged_Type
(Id
));
4341 Set_Elist26
(Id
, V
);
4342 end Set_Dispatch_Table_Wrappers
;
4344 procedure Set_DT_Entry_Count
(Id
: E
; V
: U
) is
4346 pragma Assert
(Ekind
(Id
) = E_Component
);
4348 end Set_DT_Entry_Count
;
4350 procedure Set_DT_Offset_To_Top_Func
(Id
: E
; V
: E
) is
4352 pragma Assert
(Ekind
(Id
) = E_Component
and then Is_Tag
(Id
));
4354 end Set_DT_Offset_To_Top_Func
;
4356 procedure Set_DT_Position
(Id
: E
; V
: U
) is
4358 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4360 end Set_DT_Position
;
4362 procedure Set_DTC_Entity
(Id
: E
; V
: E
) is
4364 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
4368 procedure Set_Elaborate_Body_Desirable
(Id
: E
; V
: B
:= True) is
4370 pragma Assert
(Ekind
(Id
) = E_Package
);
4371 Set_Flag210
(Id
, V
);
4372 end Set_Elaborate_Body_Desirable
;
4374 procedure Set_Elaboration_Entity
(Id
: E
; V
: E
) is
4379 Ekind
(Id
) = E_Package
4381 Is_Generic_Unit
(Id
));
4383 end Set_Elaboration_Entity
;
4385 procedure Set_Elaboration_Entity_Required
(Id
: E
; V
: B
:= True) is
4390 Ekind
(Id
) = E_Package
4392 Is_Generic_Unit
(Id
));
4393 Set_Flag174
(Id
, V
);
4394 end Set_Elaboration_Entity_Required
;
4396 procedure Set_Encapsulating_State
(Id
: E
; V
: E
) is
4398 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Constant
, E_Variable
));
4400 end Set_Encapsulating_State
;
4402 procedure Set_Enclosing_Scope
(Id
: E
; V
: E
) is
4405 end Set_Enclosing_Scope
;
4407 procedure Set_Entry_Accepted
(Id
: E
; V
: B
:= True) is
4409 pragma Assert
(Is_Entry
(Id
));
4410 Set_Flag152
(Id
, V
);
4411 end Set_Entry_Accepted
;
4413 procedure Set_Entry_Bodies_Array
(Id
: E
; V
: E
) is
4416 end Set_Entry_Bodies_Array
;
4418 procedure Set_Entry_Cancel_Parameter
(Id
: E
; V
: E
) is
4421 end Set_Entry_Cancel_Parameter
;
4423 procedure Set_Entry_Component
(Id
: E
; V
: E
) is
4426 end Set_Entry_Component
;
4428 procedure Set_Entry_Formal
(Id
: E
; V
: E
) is
4431 end Set_Entry_Formal
;
4433 procedure Set_Entry_Index_Constant
(Id
: E
; V
: E
) is
4435 pragma Assert
(Ekind
(Id
) = E_Entry_Index_Parameter
);
4437 end Set_Entry_Index_Constant
;
4439 procedure Set_Entry_Max_Queue_Lengths_Array
(Id
: E
; V
: E
) is
4441 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
4443 end Set_Entry_Max_Queue_Lengths_Array
;
4445 procedure Set_Entry_Parameters_Type
(Id
: E
; V
: E
) is
4448 end Set_Entry_Parameters_Type
;
4450 procedure Set_Enum_Pos_To_Rep
(Id
: E
; V
: E
) is
4452 pragma Assert
(Ekind
(Id
) = E_Enumeration_Type
);
4454 end Set_Enum_Pos_To_Rep
;
4456 procedure Set_Enumeration_Pos
(Id
: E
; V
: U
) is
4458 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4460 end Set_Enumeration_Pos
;
4462 procedure Set_Enumeration_Rep
(Id
: E
; V
: U
) is
4464 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4466 end Set_Enumeration_Rep
;
4468 procedure Set_Enumeration_Rep_Expr
(Id
: E
; V
: N
) is
4470 pragma Assert
(Ekind
(Id
) = E_Enumeration_Literal
);
4472 end Set_Enumeration_Rep_Expr
;
4474 procedure Set_Equivalent_Type
(Id
: E
; V
: E
) is
4477 (Ekind_In
(Id
, E_Class_Wide_Type
,
4478 E_Class_Wide_Subtype
,
4479 E_Access_Protected_Subprogram_Type
,
4480 E_Anonymous_Access_Protected_Subprogram_Type
,
4481 E_Access_Subprogram_Type
,
4484 end Set_Equivalent_Type
;
4486 procedure Set_Esize
(Id
: E
; V
: U
) is
4491 procedure Set_Extra_Accessibility
(Id
: E
; V
: E
) is
4494 (Is_Formal
(Id
) or else Ekind_In
(Id
, E_Variable
, E_Constant
));
4496 end Set_Extra_Accessibility
;
4498 procedure Set_Extra_Accessibility_Of_Result
(Id
: E
; V
: E
) is
4500 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Operator
, E_Subprogram_Type
));
4502 end Set_Extra_Accessibility_Of_Result
;
4504 procedure Set_Extra_Constrained
(Id
: E
; V
: E
) is
4506 pragma Assert
(Is_Formal
(Id
) or else Ekind
(Id
) = E_Variable
);
4508 end Set_Extra_Constrained
;
4510 procedure Set_Extra_Formal
(Id
: E
; V
: E
) is
4513 end Set_Extra_Formal
;
4515 procedure Set_Extra_Formals
(Id
: E
; V
: E
) is
4518 (Is_Overloadable
(Id
)
4519 or else Ekind_In
(Id
, E_Entry_Family
,
4521 E_Subprogram_Type
));
4523 end Set_Extra_Formals
;
4525 procedure Set_Finalization_Master
(Id
: E
; V
: E
) is
4527 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
4529 end Set_Finalization_Master
;
4531 procedure Set_Finalize_Storage_Only
(Id
: E
; V
: B
:= True) is
4533 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
4534 Set_Flag158
(Id
, V
);
4535 end Set_Finalize_Storage_Only
;
4537 procedure Set_Finalizer
(Id
: E
; V
: E
) is
4539 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
4543 procedure Set_First_Entity
(Id
: E
; V
: E
) is
4546 end Set_First_Entity
;
4548 procedure Set_First_Exit_Statement
(Id
: E
; V
: N
) is
4550 pragma Assert
(Ekind
(Id
) = E_Loop
);
4552 end Set_First_Exit_Statement
;
4554 procedure Set_First_Index
(Id
: E
; V
: N
) is
4556 pragma Assert
(Is_Array_Type
(Id
));
4558 end Set_First_Index
;
4560 procedure Set_First_Literal
(Id
: E
; V
: E
) is
4562 pragma Assert
(Is_Enumeration_Type
(Id
));
4564 end Set_First_Literal
;
4566 procedure Set_First_Private_Entity
(Id
: E
; V
: E
) is
4568 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
)
4569 or else Ekind
(Id
) in Concurrent_Kind
);
4571 end Set_First_Private_Entity
;
4573 procedure Set_First_Rep_Item
(Id
: E
; V
: N
) is
4576 end Set_First_Rep_Item
;
4578 procedure Set_Float_Rep
(Id
: E
; V
: F
) is
4579 pragma Assert
(Ekind
(Id
) = E_Floating_Point_Type
);
4581 Set_Uint10
(Id
, UI_From_Int
(F
'Pos (V
)));
4584 procedure Set_Freeze_Node
(Id
: E
; V
: N
) is
4587 end Set_Freeze_Node
;
4589 procedure Set_From_Limited_With
(Id
: E
; V
: B
:= True) is
4592 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Abstract_State
, E_Package
));
4593 Set_Flag159
(Id
, V
);
4594 end Set_From_Limited_With
;
4596 procedure Set_Full_View
(Id
: E
; V
: E
) is
4598 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Constant
);
4602 procedure Set_Generic_Homonym
(Id
: E
; V
: E
) is
4605 end Set_Generic_Homonym
;
4607 procedure Set_Generic_Renamings
(Id
: E
; V
: L
) is
4609 Set_Elist23
(Id
, V
);
4610 end Set_Generic_Renamings
;
4612 procedure Set_Handler_Records
(Id
: E
; V
: S
) is
4615 end Set_Handler_Records
;
4617 procedure Set_Has_Aliased_Components
(Id
: E
; V
: B
:= True) is
4619 pragma Assert
(Id
= Base_Type
(Id
));
4620 Set_Flag135
(Id
, V
);
4621 end Set_Has_Aliased_Components
;
4623 procedure Set_Has_Alignment_Clause
(Id
: E
; V
: B
:= True) is
4626 end Set_Has_Alignment_Clause
;
4628 procedure Set_Has_All_Calls_Remote
(Id
: E
; V
: B
:= True) is
4631 end Set_Has_All_Calls_Remote
;
4633 procedure Set_Has_Atomic_Components
(Id
: E
; V
: B
:= True) is
4635 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4637 end Set_Has_Atomic_Components
;
4639 procedure Set_Has_Biased_Representation
(Id
: E
; V
: B
:= True) is
4642 ((V
= False) or else (Is_Discrete_Type
(Id
) or else Is_Object
(Id
)));
4643 Set_Flag139
(Id
, V
);
4644 end Set_Has_Biased_Representation
;
4646 procedure Set_Has_Completion
(Id
: E
; V
: B
:= True) is
4649 end Set_Has_Completion
;
4651 procedure Set_Has_Completion_In_Body
(Id
: E
; V
: B
:= True) is
4653 pragma Assert
(Is_Type
(Id
));
4655 end Set_Has_Completion_In_Body
;
4657 procedure Set_Has_Complex_Representation
(Id
: E
; V
: B
:= True) is
4659 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
4660 Set_Flag140
(Id
, V
);
4661 end Set_Has_Complex_Representation
;
4663 procedure Set_Has_Component_Size_Clause
(Id
: E
; V
: B
:= True) is
4665 pragma Assert
(Ekind
(Id
) = E_Array_Type
);
4667 end Set_Has_Component_Size_Clause
;
4669 procedure Set_Has_Constrained_Partial_View
(Id
: E
; V
: B
:= True) is
4671 pragma Assert
(Is_Type
(Id
));
4672 Set_Flag187
(Id
, V
);
4673 end Set_Has_Constrained_Partial_View
;
4675 procedure Set_Has_Contiguous_Rep
(Id
: E
; V
: B
:= True) is
4677 Set_Flag181
(Id
, V
);
4678 end Set_Has_Contiguous_Rep
;
4680 procedure Set_Has_Controlled_Component
(Id
: E
; V
: B
:= True) is
4682 pragma Assert
(Id
= Base_Type
(Id
));
4684 end Set_Has_Controlled_Component
;
4686 procedure Set_Has_Controlling_Result
(Id
: E
; V
: B
:= True) is
4689 end Set_Has_Controlling_Result
;
4691 procedure Set_Has_Convention_Pragma
(Id
: E
; V
: B
:= True) is
4693 Set_Flag119
(Id
, V
);
4694 end Set_Has_Convention_Pragma
;
4696 procedure Set_Has_Default_Aspect
(Id
: E
; V
: B
:= True) is
4699 ((Is_Scalar_Type
(Id
) or else Is_Array_Type
(Id
))
4700 and then Is_Base_Type
(Id
));
4702 end Set_Has_Default_Aspect
;
4704 procedure Set_Has_Delayed_Aspects
(Id
: E
; V
: B
:= True) is
4706 pragma Assert
(Nkind
(Id
) in N_Entity
);
4707 Set_Flag200
(Id
, V
);
4708 end Set_Has_Delayed_Aspects
;
4710 procedure Set_Has_Delayed_Freeze
(Id
: E
; V
: B
:= True) is
4712 pragma Assert
(Nkind
(Id
) in N_Entity
);
4714 end Set_Has_Delayed_Freeze
;
4716 procedure Set_Has_Delayed_Rep_Aspects
(Id
: E
; V
: B
:= True) is
4718 pragma Assert
(Nkind
(Id
) in N_Entity
);
4719 Set_Flag261
(Id
, V
);
4720 end Set_Has_Delayed_Rep_Aspects
;
4722 procedure Set_Has_Discriminants
(Id
: E
; V
: B
:= True) is
4724 pragma Assert
(Nkind
(Id
) in N_Entity
);
4726 end Set_Has_Discriminants
;
4728 procedure Set_Has_Dispatch_Table
(Id
: E
; V
: B
:= True) is
4730 pragma Assert
(Ekind
(Id
) = E_Record_Type
4731 and then Is_Tagged_Type
(Id
));
4732 Set_Flag220
(Id
, V
);
4733 end Set_Has_Dispatch_Table
;
4735 procedure Set_Has_Dynamic_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
4737 pragma Assert
(Is_Type
(Id
));
4738 Set_Flag258
(Id
, V
);
4739 end Set_Has_Dynamic_Predicate_Aspect
;
4741 procedure Set_Has_Enumeration_Rep_Clause
(Id
: E
; V
: B
:= True) is
4743 pragma Assert
(Is_Enumeration_Type
(Id
));
4745 end Set_Has_Enumeration_Rep_Clause
;
4747 procedure Set_Has_Exit
(Id
: E
; V
: B
:= True) is
4752 procedure Set_Has_Expanded_Contract
(Id
: E
; V
: B
:= True) is
4754 pragma Assert
(Ekind_In
(Id
, E_Entry
,
4758 Set_Flag240
(Id
, V
);
4759 end Set_Has_Expanded_Contract
;
4761 procedure Set_Has_Forward_Instantiation
(Id
: E
; V
: B
:= True) is
4763 Set_Flag175
(Id
, V
);
4764 end Set_Has_Forward_Instantiation
;
4766 procedure Set_Has_Fully_Qualified_Name
(Id
: E
; V
: B
:= True) is
4768 Set_Flag173
(Id
, V
);
4769 end Set_Has_Fully_Qualified_Name
;
4771 procedure Set_Has_Gigi_Rep_Item
(Id
: E
; V
: B
:= True) is
4774 end Set_Has_Gigi_Rep_Item
;
4776 procedure Set_Has_Homonym
(Id
: E
; V
: B
:= True) is
4779 end Set_Has_Homonym
;
4781 procedure Set_Has_Implicit_Dereference
(Id
: E
; V
: B
:= True) is
4783 Set_Flag251
(Id
, V
);
4784 end Set_Has_Implicit_Dereference
;
4786 procedure Set_Has_Independent_Components
(Id
: E
; V
: B
:= True) is
4788 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
4790 end Set_Has_Independent_Components
;
4792 procedure Set_Has_Inheritable_Invariants
(Id
: E
; V
: B
:= True) is
4794 pragma Assert
(Is_Type
(Id
));
4795 Set_Flag248
(Base_Type
(Id
), V
);
4796 end Set_Has_Inheritable_Invariants
;
4798 procedure Set_Has_Inherited_DIC
(Id
: E
; V
: B
:= True) is
4800 pragma Assert
(Is_Type
(Id
));
4801 Set_Flag133
(Base_Type
(Id
), V
);
4802 end Set_Has_Inherited_DIC
;
4804 procedure Set_Has_Inherited_Invariants
(Id
: E
; V
: B
:= True) is
4806 pragma Assert
(Is_Type
(Id
));
4807 Set_Flag291
(Base_Type
(Id
), V
);
4808 end Set_Has_Inherited_Invariants
;
4810 procedure Set_Has_Initial_Value
(Id
: E
; V
: B
:= True) is
4812 pragma Assert
(Ekind_In
(Id
, E_Variable
, E_Out_Parameter
));
4813 Set_Flag219
(Id
, V
);
4814 end Set_Has_Initial_Value
;
4816 procedure Set_Has_Loop_Entry_Attributes
(Id
: E
; V
: B
:= True) is
4818 pragma Assert
(Ekind
(Id
) = E_Loop
);
4819 Set_Flag260
(Id
, V
);
4820 end Set_Has_Loop_Entry_Attributes
;
4822 procedure Set_Has_Machine_Radix_Clause
(Id
: E
; V
: B
:= True) is
4824 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
4826 end Set_Has_Machine_Radix_Clause
;
4828 procedure Set_Has_Master_Entity
(Id
: E
; V
: B
:= True) is
4831 end Set_Has_Master_Entity
;
4833 procedure Set_Has_Missing_Return
(Id
: E
; V
: B
:= True) is
4835 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Generic_Function
));
4836 Set_Flag142
(Id
, V
);
4837 end Set_Has_Missing_Return
;
4839 procedure Set_Has_Nested_Block_With_Handler
(Id
: E
; V
: B
:= True) is
4841 Set_Flag101
(Id
, V
);
4842 end Set_Has_Nested_Block_With_Handler
;
4844 procedure Set_Has_Nested_Subprogram
(Id
: E
; V
: B
:= True) is
4846 pragma Assert
(Is_Subprogram
(Id
));
4847 Set_Flag282
(Id
, V
);
4848 end Set_Has_Nested_Subprogram
;
4850 procedure Set_Has_Non_Standard_Rep
(Id
: E
; V
: B
:= True) is
4852 pragma Assert
(Id
= Base_Type
(Id
));
4854 end Set_Has_Non_Standard_Rep
;
4856 procedure Set_Has_Object_Size_Clause
(Id
: E
; V
: B
:= True) is
4858 pragma Assert
(Is_Type
(Id
));
4859 Set_Flag172
(Id
, V
);
4860 end Set_Has_Object_Size_Clause
;
4862 procedure Set_Has_Out_Or_In_Out_Parameter
(Id
: E
; V
: B
:= True) is
4865 (Ekind_In
(Id
, E_Entry
, E_Entry_Family
)
4866 or else Is_Subprogram_Or_Generic_Subprogram
(Id
));
4867 Set_Flag110
(Id
, V
);
4868 end Set_Has_Out_Or_In_Out_Parameter
;
4870 procedure Set_Has_Own_DIC
(Id
: E
; V
: B
:= True) is
4872 pragma Assert
(Is_Type
(Id
));
4873 Set_Flag3
(Base_Type
(Id
), V
);
4874 end Set_Has_Own_DIC
;
4876 procedure Set_Has_Own_Invariants
(Id
: E
; V
: B
:= True) is
4878 pragma Assert
(Is_Type
(Id
));
4879 Set_Flag232
(Base_Type
(Id
), V
);
4880 end Set_Has_Own_Invariants
;
4882 procedure Set_Has_Partial_Visible_Refinement
(Id
: E
; V
: B
:= True) is
4884 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
4885 Set_Flag296
(Id
, V
);
4886 end Set_Has_Partial_Visible_Refinement
;
4888 procedure Set_Has_Per_Object_Constraint
(Id
: E
; V
: B
:= True) is
4890 Set_Flag154
(Id
, V
);
4891 end Set_Has_Per_Object_Constraint
;
4893 procedure Set_Has_Pragma_Controlled
(Id
: E
; V
: B
:= True) is
4895 pragma Assert
(Is_Access_Type
(Id
));
4896 Set_Flag27
(Base_Type
(Id
), V
);
4897 end Set_Has_Pragma_Controlled
;
4899 procedure Set_Has_Pragma_Elaborate_Body
(Id
: E
; V
: B
:= True) is
4901 Set_Flag150
(Id
, V
);
4902 end Set_Has_Pragma_Elaborate_Body
;
4904 procedure Set_Has_Pragma_Inline
(Id
: E
; V
: B
:= True) is
4906 Set_Flag157
(Id
, V
);
4907 end Set_Has_Pragma_Inline
;
4909 procedure Set_Has_Pragma_Inline_Always
(Id
: E
; V
: B
:= True) is
4911 Set_Flag230
(Id
, V
);
4912 end Set_Has_Pragma_Inline_Always
;
4914 procedure Set_Has_Pragma_No_Inline
(Id
: E
; V
: B
:= True) is
4916 Set_Flag201
(Id
, V
);
4917 end Set_Has_Pragma_No_Inline
;
4919 procedure Set_Has_Pragma_Ordered
(Id
: E
; V
: B
:= True) is
4921 pragma Assert
(Is_Enumeration_Type
(Id
));
4922 pragma Assert
(Id
= Base_Type
(Id
));
4923 Set_Flag198
(Id
, V
);
4924 end Set_Has_Pragma_Ordered
;
4926 procedure Set_Has_Pragma_Pack
(Id
: E
; V
: B
:= True) is
4928 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
4929 pragma Assert
(Id
= Base_Type
(Id
));
4930 Set_Flag121
(Id
, V
);
4931 end Set_Has_Pragma_Pack
;
4933 procedure Set_Has_Pragma_Preelab_Init
(Id
: E
; V
: B
:= True) is
4935 Set_Flag221
(Id
, V
);
4936 end Set_Has_Pragma_Preelab_Init
;
4938 procedure Set_Has_Pragma_Pure
(Id
: E
; V
: B
:= True) is
4940 Set_Flag203
(Id
, V
);
4941 end Set_Has_Pragma_Pure
;
4943 procedure Set_Has_Pragma_Pure_Function
(Id
: E
; V
: B
:= True) is
4945 Set_Flag179
(Id
, V
);
4946 end Set_Has_Pragma_Pure_Function
;
4948 procedure Set_Has_Pragma_Thread_Local_Storage
(Id
: E
; V
: B
:= True) is
4950 Set_Flag169
(Id
, V
);
4951 end Set_Has_Pragma_Thread_Local_Storage
;
4953 procedure Set_Has_Pragma_Unmodified
(Id
: E
; V
: B
:= True) is
4955 Set_Flag233
(Id
, V
);
4956 end Set_Has_Pragma_Unmodified
;
4958 procedure Set_Has_Pragma_Unreferenced
(Id
: E
; V
: B
:= True) is
4960 Set_Flag180
(Id
, V
);
4961 end Set_Has_Pragma_Unreferenced
;
4963 procedure Set_Has_Pragma_Unreferenced_Objects
(Id
: E
; V
: B
:= True) is
4965 pragma Assert
(Is_Type
(Id
));
4966 Set_Flag212
(Id
, V
);
4967 end Set_Has_Pragma_Unreferenced_Objects
;
4969 procedure Set_Has_Pragma_Unused
(Id
: E
; V
: B
:= True) is
4971 Set_Flag294
(Id
, V
);
4972 end Set_Has_Pragma_Unused
;
4974 procedure Set_Has_Predicates
(Id
: E
; V
: B
:= True) is
4976 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Void
);
4977 Set_Flag250
(Id
, V
);
4978 end Set_Has_Predicates
;
4980 procedure Set_Has_Primitive_Operations
(Id
: E
; V
: B
:= True) is
4982 pragma Assert
(Id
= Base_Type
(Id
));
4983 Set_Flag120
(Id
, V
);
4984 end Set_Has_Primitive_Operations
;
4986 procedure Set_Has_Private_Ancestor
(Id
: E
; V
: B
:= True) is
4988 pragma Assert
(Is_Type
(Id
));
4989 Set_Flag151
(Id
, V
);
4990 end Set_Has_Private_Ancestor
;
4992 procedure Set_Has_Private_Declaration
(Id
: E
; V
: B
:= True) is
4994 Set_Flag155
(Id
, V
);
4995 end Set_Has_Private_Declaration
;
4997 procedure Set_Has_Private_Extension
(Id
: E
; V
: B
:= True) is
4999 pragma Assert
(Is_Tagged_Type
(Id
));
5000 Set_Flag300
(Id
, V
);
5001 end Set_Has_Private_Extension
;
5003 procedure Set_Has_Protected
(Id
: E
; V
: B
:= True) is
5005 Set_Flag271
(Id
, V
);
5006 end Set_Has_Protected
;
5008 procedure Set_Has_Qualified_Name
(Id
: E
; V
: B
:= True) is
5010 Set_Flag161
(Id
, V
);
5011 end Set_Has_Qualified_Name
;
5013 procedure Set_Has_RACW
(Id
: E
; V
: B
:= True) is
5015 pragma Assert
(Ekind
(Id
) = E_Package
);
5016 Set_Flag214
(Id
, V
);
5019 procedure Set_Has_Record_Rep_Clause
(Id
: E
; V
: B
:= True) is
5021 pragma Assert
(Id
= Base_Type
(Id
));
5023 end Set_Has_Record_Rep_Clause
;
5025 procedure Set_Has_Recursive_Call
(Id
: E
; V
: B
:= True) is
5027 pragma Assert
(Is_Subprogram
(Id
));
5028 Set_Flag143
(Id
, V
);
5029 end Set_Has_Recursive_Call
;
5031 procedure Set_Has_Shift_Operator
(Id
: E
; V
: B
:= True) is
5033 pragma Assert
(Is_Integer_Type
(Id
) and then Is_Base_Type
(Id
));
5034 Set_Flag267
(Id
, V
);
5035 end Set_Has_Shift_Operator
;
5037 procedure Set_Has_Size_Clause
(Id
: E
; V
: B
:= True) is
5040 end Set_Has_Size_Clause
;
5042 procedure Set_Has_Small_Clause
(Id
: E
; V
: B
:= True) is
5044 pragma Assert
(Is_Ordinary_Fixed_Point_Type
(Id
));
5046 end Set_Has_Small_Clause
;
5048 procedure Set_Has_Specified_Layout
(Id
: E
; V
: B
:= True) is
5050 pragma Assert
(Id
= Base_Type
(Id
));
5051 Set_Flag100
(Id
, V
);
5052 end Set_Has_Specified_Layout
;
5054 procedure Set_Has_Specified_Stream_Input
(Id
: E
; V
: B
:= True) is
5056 pragma Assert
(Is_Type
(Id
));
5057 Set_Flag190
(Id
, V
);
5058 end Set_Has_Specified_Stream_Input
;
5060 procedure Set_Has_Specified_Stream_Output
(Id
: E
; V
: B
:= True) is
5062 pragma Assert
(Is_Type
(Id
));
5063 Set_Flag191
(Id
, V
);
5064 end Set_Has_Specified_Stream_Output
;
5066 procedure Set_Has_Specified_Stream_Read
(Id
: E
; V
: B
:= True) is
5068 pragma Assert
(Is_Type
(Id
));
5069 Set_Flag192
(Id
, V
);
5070 end Set_Has_Specified_Stream_Read
;
5072 procedure Set_Has_Specified_Stream_Write
(Id
: E
; V
: B
:= True) is
5074 pragma Assert
(Is_Type
(Id
));
5075 Set_Flag193
(Id
, V
);
5076 end Set_Has_Specified_Stream_Write
;
5078 procedure Set_Has_Static_Discriminants
(Id
: E
; V
: B
:= True) is
5080 Set_Flag211
(Id
, V
);
5081 end Set_Has_Static_Discriminants
;
5083 procedure Set_Has_Static_Predicate
(Id
: E
; V
: B
:= True) is
5085 pragma Assert
(Is_Type
(Id
));
5086 Set_Flag269
(Id
, V
);
5087 end Set_Has_Static_Predicate
;
5089 procedure Set_Has_Static_Predicate_Aspect
(Id
: E
; V
: B
:= True) is
5091 pragma Assert
(Is_Type
(Id
));
5092 Set_Flag259
(Id
, V
);
5093 end Set_Has_Static_Predicate_Aspect
;
5095 procedure Set_Has_Storage_Size_Clause
(Id
: E
; V
: B
:= True) is
5097 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
5098 pragma Assert
(Id
= Base_Type
(Id
));
5100 end Set_Has_Storage_Size_Clause
;
5102 procedure Set_Has_Stream_Size_Clause
(Id
: E
; V
: B
:= True) is
5104 pragma Assert
(Is_Elementary_Type
(Id
));
5105 Set_Flag184
(Id
, V
);
5106 end Set_Has_Stream_Size_Clause
;
5108 procedure Set_Has_Task
(Id
: E
; V
: B
:= True) is
5110 pragma Assert
(Id
= Base_Type
(Id
));
5114 procedure Set_Has_Thunks
(Id
: E
; V
: B
:= True) is
5116 pragma Assert
(Is_Tag
(Id
));
5117 Set_Flag228
(Id
, V
);
5120 procedure Set_Has_Timing_Event
(Id
: E
; V
: B
:= True) is
5122 pragma Assert
(Id
= Base_Type
(Id
));
5123 Set_Flag289
(Id
, V
);
5124 end Set_Has_Timing_Event
;
5126 procedure Set_Has_Unchecked_Union
(Id
: E
; V
: B
:= True) is
5128 pragma Assert
(Id
= Base_Type
(Id
));
5129 Set_Flag123
(Id
, V
);
5130 end Set_Has_Unchecked_Union
;
5132 procedure Set_Has_Unknown_Discriminants
(Id
: E
; V
: B
:= True) is
5134 pragma Assert
(Is_Type
(Id
));
5136 end Set_Has_Unknown_Discriminants
;
5138 procedure Set_Has_Visible_Refinement
(Id
: E
; V
: B
:= True) is
5140 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
5141 Set_Flag263
(Id
, V
);
5142 end Set_Has_Visible_Refinement
;
5144 procedure Set_Has_Volatile_Components
(Id
: E
; V
: B
:= True) is
5146 pragma Assert
(not Is_Type
(Id
) or else Is_Base_Type
(Id
));
5148 end Set_Has_Volatile_Components
;
5150 procedure Set_Has_Xref_Entry
(Id
: E
; V
: B
:= True) is
5152 Set_Flag182
(Id
, V
);
5153 end Set_Has_Xref_Entry
;
5155 procedure Set_Hiding_Loop_Variable
(Id
: E
; V
: E
) is
5157 pragma Assert
(Ekind
(Id
) = E_Variable
);
5159 end Set_Hiding_Loop_Variable
;
5161 procedure Set_Homonym
(Id
: E
; V
: E
) is
5163 pragma Assert
(Id
/= V
);
5167 procedure Set_Incomplete_Actuals
(Id
: E
; V
: L
) is
5169 pragma Assert
(Ekind
(Id
) = E_Package
);
5170 Set_Elist24
(Id
, V
);
5171 end Set_Incomplete_Actuals
;
5173 procedure Set_Ignore_SPARK_Mode_Pragmas
(Id
: E
; V
: B
:= True) is
5176 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent variants
5181 Ekind_In
(Id
, E_Entry
, -- overloadable variants
5185 E_Generic_Procedure
,
5190 Ekind_In
(Id
, E_Generic_Package
, -- package variants
5193 Set_Flag301
(Id
, V
);
5194 end Set_Ignore_SPARK_Mode_Pragmas
;
5196 procedure Set_Import_Pragma
(Id
: E
; V
: E
) is
5198 pragma Assert
(Is_Subprogram
(Id
));
5200 end Set_Import_Pragma
;
5202 procedure Set_Interface_Alias
(Id
: E
; V
: E
) is
5206 and then Is_Hidden
(Id
)
5207 and then (Ekind_In
(Id
, E_Procedure
, E_Function
)));
5209 end Set_Interface_Alias
;
5211 procedure Set_Interfaces
(Id
: E
; V
: L
) is
5213 pragma Assert
(Is_Record_Type
(Id
));
5214 Set_Elist25
(Id
, V
);
5217 procedure Set_In_Package_Body
(Id
: E
; V
: B
:= True) is
5220 end Set_In_Package_Body
;
5222 procedure Set_In_Private_Part
(Id
: E
; V
: B
:= True) is
5225 end Set_In_Private_Part
;
5227 procedure Set_In_Use
(Id
: E
; V
: B
:= True) is
5229 pragma Assert
(Nkind
(Id
) in N_Entity
);
5233 procedure Set_Initialization_Statements
(Id
: E
; V
: N
) is
5235 -- Tolerate an E_Void entity since this can be called while resolving
5236 -- an aggregate used as the initialization expression for an object
5237 -- declaration, and this occurs before the Ekind for the object is set.
5239 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Constant
, E_Variable
));
5241 end Set_Initialization_Statements
;
5243 procedure Set_Inner_Instances
(Id
: E
; V
: L
) is
5245 Set_Elist23
(Id
, V
);
5246 end Set_Inner_Instances
;
5248 procedure Set_Interface_Name
(Id
: E
; V
: N
) is
5251 end Set_Interface_Name
;
5253 procedure Set_Is_Abstract_Subprogram
(Id
: E
; V
: B
:= True) is
5255 pragma Assert
(Is_Overloadable
(Id
));
5257 end Set_Is_Abstract_Subprogram
;
5259 procedure Set_Is_Abstract_Type
(Id
: E
; V
: B
:= True) is
5261 pragma Assert
(Is_Type
(Id
));
5262 Set_Flag146
(Id
, V
);
5263 end Set_Is_Abstract_Type
;
5265 procedure Set_Is_Local_Anonymous_Access
(Id
: E
; V
: B
:= True) is
5267 pragma Assert
(Is_Access_Type
(Id
));
5268 Set_Flag194
(Id
, V
);
5269 end Set_Is_Local_Anonymous_Access
;
5271 procedure Set_Is_Access_Constant
(Id
: E
; V
: B
:= True) is
5273 pragma Assert
(Is_Access_Type
(Id
));
5275 end Set_Is_Access_Constant
;
5277 procedure Set_Is_Actual_Subtype
(Id
: E
; V
: B
:= True) is
5279 pragma Assert
(Is_Type
(Id
));
5280 Set_Flag293
(Id
, V
);
5281 end Set_Is_Actual_Subtype
;
5283 procedure Set_Is_Ada_2005_Only
(Id
: E
; V
: B
:= True) is
5285 Set_Flag185
(Id
, V
);
5286 end Set_Is_Ada_2005_Only
;
5288 procedure Set_Is_Ada_2012_Only
(Id
: E
; V
: B
:= True) is
5290 Set_Flag199
(Id
, V
);
5291 end Set_Is_Ada_2012_Only
;
5293 procedure Set_Is_Aliased
(Id
: E
; V
: B
:= True) is
5295 pragma Assert
(Nkind
(Id
) in N_Entity
);
5299 procedure Set_Is_Asynchronous
(Id
: E
; V
: B
:= True) is
5302 (Ekind
(Id
) = E_Procedure
or else Is_Type
(Id
));
5304 end Set_Is_Asynchronous
;
5306 procedure Set_Is_Atomic
(Id
: E
; V
: B
:= True) is
5311 procedure Set_Is_Bit_Packed_Array
(Id
: E
; V
: B
:= True) is
5313 pragma Assert
((not V
)
5314 or else (Is_Array_Type
(Id
) and then Is_Base_Type
(Id
)));
5315 Set_Flag122
(Id
, V
);
5316 end Set_Is_Bit_Packed_Array
;
5318 procedure Set_Is_Called
(Id
: E
; V
: B
:= True) is
5320 pragma Assert
(Ekind_In
(Id
, E_Procedure
, E_Function
));
5321 Set_Flag102
(Id
, V
);
5324 procedure Set_Is_Character_Type
(Id
: E
; V
: B
:= True) is
5327 end Set_Is_Character_Type
;
5329 procedure Set_Is_Checked_Ghost_Entity
(Id
: E
; V
: B
:= True) is
5331 -- Allow this attribute to appear on unanalyzed entities
5333 pragma Assert
(Nkind
(Id
) in N_Entity
5334 or else Ekind
(Id
) = E_Void
);
5335 Set_Flag277
(Id
, V
);
5336 end Set_Is_Checked_Ghost_Entity
;
5338 procedure Set_Is_Child_Unit
(Id
: E
; V
: B
:= True) is
5341 end Set_Is_Child_Unit
;
5343 procedure Set_Is_Class_Wide_Clone
(Id
: E
; V
: B
:= True) is
5345 Set_Flag290
(Id
, V
);
5346 end Set_Is_Class_Wide_Clone
;
5348 procedure Set_Is_Class_Wide_Equivalent_Type
(Id
: E
; V
: B
:= True) is
5351 end Set_Is_Class_Wide_Equivalent_Type
;
5353 procedure Set_Is_Compilation_Unit
(Id
: E
; V
: B
:= True) is
5355 Set_Flag149
(Id
, V
);
5356 end Set_Is_Compilation_Unit
;
5358 procedure Set_Is_Completely_Hidden
(Id
: E
; V
: B
:= True) is
5360 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
5361 Set_Flag103
(Id
, V
);
5362 end Set_Is_Completely_Hidden
;
5364 procedure Set_Is_Concurrent_Record_Type
(Id
: E
; V
: B
:= True) is
5367 end Set_Is_Concurrent_Record_Type
;
5369 procedure Set_Is_Constr_Subt_For_U_Nominal
(Id
: E
; V
: B
:= True) is
5372 end Set_Is_Constr_Subt_For_U_Nominal
;
5374 procedure Set_Is_Constr_Subt_For_UN_Aliased
(Id
: E
; V
: B
:= True) is
5376 Set_Flag141
(Id
, V
);
5377 end Set_Is_Constr_Subt_For_UN_Aliased
;
5379 procedure Set_Is_Constrained
(Id
: E
; V
: B
:= True) is
5381 pragma Assert
(Nkind
(Id
) in N_Entity
);
5383 end Set_Is_Constrained
;
5385 procedure Set_Is_Constructor
(Id
: E
; V
: B
:= True) is
5388 end Set_Is_Constructor
;
5390 procedure Set_Is_Controlled_Active
(Id
: E
; V
: B
:= True) is
5392 pragma Assert
(Id
= Base_Type
(Id
));
5394 end Set_Is_Controlled_Active
;
5396 procedure Set_Is_Controlling_Formal
(Id
: E
; V
: B
:= True) is
5398 pragma Assert
(Is_Formal
(Id
));
5400 end Set_Is_Controlling_Formal
;
5402 procedure Set_Is_CPP_Class
(Id
: E
; V
: B
:= True) is
5405 end Set_Is_CPP_Class
;
5407 procedure Set_Is_DIC_Procedure
(Id
: E
; V
: B
:= True) is
5409 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5410 Set_Flag132
(Id
, V
);
5411 end Set_Is_DIC_Procedure
;
5413 procedure Set_Is_Descendant_Of_Address
(Id
: E
; V
: B
:= True) is
5415 pragma Assert
(Is_Type
(Id
));
5416 Set_Flag223
(Id
, V
);
5417 end Set_Is_Descendant_Of_Address
;
5419 procedure Set_Is_Discrim_SO_Function
(Id
: E
; V
: B
:= True) is
5421 Set_Flag176
(Id
, V
);
5422 end Set_Is_Discrim_SO_Function
;
5424 procedure Set_Is_Discriminant_Check_Function
(Id
: E
; V
: B
:= True) is
5426 Set_Flag264
(Id
, V
);
5427 end Set_Is_Discriminant_Check_Function
;
5429 procedure Set_Is_Dispatch_Table_Entity
(Id
: E
; V
: B
:= True) is
5431 Set_Flag234
(Id
, V
);
5432 end Set_Is_Dispatch_Table_Entity
;
5434 procedure Set_Is_Dispatching_Operation
(Id
: E
; V
: B
:= True) is
5439 Is_Overloadable
(Id
)
5441 Ekind
(Id
) = E_Subprogram_Type
);
5444 end Set_Is_Dispatching_Operation
;
5446 procedure Set_Is_Elaboration_Checks_OK_Id
(Id
: E
; V
: B
:= True) is
5449 (Ekind_In
(Id
, E_Constant
, E_Variable
)
5450 or else Is_Entry
(Id
)
5451 or else Is_Generic_Unit
(Id
)
5452 or else Is_Subprogram
(Id
)
5453 or else Is_Task_Type
(Id
));
5454 Set_Flag148
(Id
, V
);
5455 end Set_Is_Elaboration_Checks_OK_Id
;
5457 procedure Set_Is_Eliminated
(Id
: E
; V
: B
:= True) is
5459 Set_Flag124
(Id
, V
);
5460 end Set_Is_Eliminated
;
5462 procedure Set_Is_Entry_Formal
(Id
: E
; V
: B
:= True) is
5465 end Set_Is_Entry_Formal
;
5467 procedure Set_Is_Entry_Wrapper
(Id
: E
; V
: B
:= True) is
5469 Set_Flag297
(Id
, V
);
5470 end Set_Is_Entry_Wrapper
;
5472 procedure Set_Is_Exception_Handler
(Id
: E
; V
: B
:= True) is
5474 pragma Assert
(Ekind
(Id
) = E_Block
);
5475 Set_Flag286
(Id
, V
);
5476 end Set_Is_Exception_Handler
;
5478 procedure Set_Is_Exported
(Id
: E
; V
: B
:= True) is
5481 end Set_Is_Exported
;
5483 procedure Set_Is_Finalized_Transient
(Id
: E
; V
: B
:= True) is
5485 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
5486 Set_Flag252
(Id
, V
);
5487 end Set_Is_Finalized_Transient
;
5489 procedure Set_Is_First_Subtype
(Id
: E
; V
: B
:= True) is
5492 end Set_Is_First_Subtype
;
5494 procedure Set_Is_For_Access_Subtype
(Id
: E
; V
: B
:= True) is
5496 pragma Assert
(Ekind_In
(Id
, E_Record_Subtype
, E_Private_Subtype
));
5497 Set_Flag118
(Id
, V
);
5498 end Set_Is_For_Access_Subtype
;
5500 procedure Set_Is_Formal_Subprogram
(Id
: E
; V
: B
:= True) is
5502 Set_Flag111
(Id
, V
);
5503 end Set_Is_Formal_Subprogram
;
5505 procedure Set_Is_Frozen
(Id
: E
; V
: B
:= True) is
5507 pragma Assert
(Nkind
(Id
) in N_Entity
);
5511 procedure Set_Is_Generic_Actual_Subprogram
(Id
: E
; V
: B
:= True) is
5513 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5514 Set_Flag274
(Id
, V
);
5515 end Set_Is_Generic_Actual_Subprogram
;
5517 procedure Set_Is_Generic_Actual_Type
(Id
: E
; V
: B
:= True) is
5519 pragma Assert
(Is_Type
(Id
));
5521 end Set_Is_Generic_Actual_Type
;
5523 procedure Set_Is_Generic_Instance
(Id
: E
; V
: B
:= True) is
5525 Set_Flag130
(Id
, V
);
5526 end Set_Is_Generic_Instance
;
5528 procedure Set_Is_Generic_Type
(Id
: E
; V
: B
:= True) is
5530 pragma Assert
(Nkind
(Id
) in N_Entity
);
5532 end Set_Is_Generic_Type
;
5534 procedure Set_Is_Hidden
(Id
: E
; V
: B
:= True) is
5539 procedure Set_Is_Hidden_Non_Overridden_Subpgm
(Id
: E
; V
: B
:= True) is
5541 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5543 end Set_Is_Hidden_Non_Overridden_Subpgm
;
5545 procedure Set_Is_Hidden_Open_Scope
(Id
: E
; V
: B
:= True) is
5547 Set_Flag171
(Id
, V
);
5548 end Set_Is_Hidden_Open_Scope
;
5550 procedure Set_Is_Ignored_Ghost_Entity
(Id
: E
; V
: B
:= True) is
5552 -- Allow this attribute to appear on unanalyzed entities
5554 pragma Assert
(Nkind
(Id
) in N_Entity
5555 or else Ekind
(Id
) = E_Void
);
5556 Set_Flag278
(Id
, V
);
5557 end Set_Is_Ignored_Ghost_Entity
;
5559 procedure Set_Is_Ignored_Transient
(Id
: E
; V
: B
:= True) is
5561 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Loop_Parameter
, E_Variable
));
5562 Set_Flag295
(Id
, V
);
5563 end Set_Is_Ignored_Transient
;
5565 procedure Set_Is_Immediately_Visible
(Id
: E
; V
: B
:= True) is
5567 pragma Assert
(Nkind
(Id
) in N_Entity
);
5569 end Set_Is_Immediately_Visible
;
5571 procedure Set_Is_Implementation_Defined
(Id
: E
; V
: B
:= True) is
5573 Set_Flag254
(Id
, V
);
5574 end Set_Is_Implementation_Defined
;
5576 procedure Set_Is_Imported
(Id
: E
; V
: B
:= True) is
5579 end Set_Is_Imported
;
5581 procedure Set_Is_Independent
(Id
: E
; V
: B
:= True) is
5583 Set_Flag268
(Id
, V
);
5584 end Set_Is_Independent
;
5586 procedure Set_Is_Initial_Condition_Procedure
(Id
: E
; V
: B
:= True) is
5588 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5589 Set_Flag302
(Id
, V
);
5590 end Set_Is_Initial_Condition_Procedure
;
5592 procedure Set_Is_Inlined
(Id
: E
; V
: B
:= True) is
5597 procedure Set_Is_Inlined_Always
(Id
: E
; V
: B
:= True) is
5599 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5601 end Set_Is_Inlined_Always
;
5603 procedure Set_Is_Interface
(Id
: E
; V
: B
:= True) is
5605 pragma Assert
(Is_Record_Type
(Id
));
5606 Set_Flag186
(Id
, V
);
5607 end Set_Is_Interface
;
5609 procedure Set_Is_Instantiated
(Id
: E
; V
: B
:= True) is
5611 Set_Flag126
(Id
, V
);
5612 end Set_Is_Instantiated
;
5614 procedure Set_Is_Internal
(Id
: E
; V
: B
:= True) is
5616 pragma Assert
(Nkind
(Id
) in N_Entity
);
5618 end Set_Is_Internal
;
5620 procedure Set_Is_Interrupt_Handler
(Id
: E
; V
: B
:= True) is
5622 pragma Assert
(Nkind
(Id
) in N_Entity
);
5624 end Set_Is_Interrupt_Handler
;
5626 procedure Set_Is_Intrinsic_Subprogram
(Id
: E
; V
: B
:= True) is
5629 end Set_Is_Intrinsic_Subprogram
;
5631 procedure Set_Is_Invariant_Procedure
(Id
: E
; V
: B
:= True) is
5633 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5634 Set_Flag257
(Id
, V
);
5635 end Set_Is_Invariant_Procedure
;
5637 procedure Set_Is_Itype
(Id
: E
; V
: B
:= True) is
5642 procedure Set_Is_Known_Non_Null
(Id
: E
; V
: B
:= True) is
5645 end Set_Is_Known_Non_Null
;
5647 procedure Set_Is_Known_Null
(Id
: E
; V
: B
:= True) is
5649 Set_Flag204
(Id
, V
);
5650 end Set_Is_Known_Null
;
5652 procedure Set_Is_Known_Valid
(Id
: E
; V
: B
:= True) is
5654 Set_Flag170
(Id
, V
);
5655 end Set_Is_Known_Valid
;
5657 procedure Set_Is_Limited_Composite
(Id
: E
; V
: B
:= True) is
5659 pragma Assert
(Is_Type
(Id
));
5660 Set_Flag106
(Id
, V
);
5661 end Set_Is_Limited_Composite
;
5663 procedure Set_Is_Limited_Interface
(Id
: E
; V
: B
:= True) is
5665 pragma Assert
(Is_Interface
(Id
));
5666 Set_Flag197
(Id
, V
);
5667 end Set_Is_Limited_Interface
;
5669 procedure Set_Is_Limited_Record
(Id
: E
; V
: B
:= True) is
5672 end Set_Is_Limited_Record
;
5674 procedure Set_Is_Machine_Code_Subprogram
(Id
: E
; V
: B
:= True) is
5676 pragma Assert
(Is_Subprogram
(Id
));
5677 Set_Flag137
(Id
, V
);
5678 end Set_Is_Machine_Code_Subprogram
;
5680 procedure Set_Is_Non_Static_Subtype
(Id
: E
; V
: B
:= True) is
5682 pragma Assert
(Is_Type
(Id
));
5683 Set_Flag109
(Id
, V
);
5684 end Set_Is_Non_Static_Subtype
;
5686 procedure Set_Is_Null_Init_Proc
(Id
: E
; V
: B
:= True) is
5688 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5689 Set_Flag178
(Id
, V
);
5690 end Set_Is_Null_Init_Proc
;
5692 procedure Set_Is_Obsolescent
(Id
: E
; V
: B
:= True) is
5694 Set_Flag153
(Id
, V
);
5695 end Set_Is_Obsolescent
;
5697 procedure Set_Is_Only_Out_Parameter
(Id
: E
; V
: B
:= True) is
5699 pragma Assert
(Ekind
(Id
) = E_Out_Parameter
);
5700 Set_Flag226
(Id
, V
);
5701 end Set_Is_Only_Out_Parameter
;
5703 procedure Set_Is_Package_Body_Entity
(Id
: E
; V
: B
:= True) is
5705 Set_Flag160
(Id
, V
);
5706 end Set_Is_Package_Body_Entity
;
5708 procedure Set_Is_Packed
(Id
: E
; V
: B
:= True) is
5710 pragma Assert
(Id
= Base_Type
(Id
));
5714 procedure Set_Is_Packed_Array_Impl_Type
(Id
: E
; V
: B
:= True) is
5716 Set_Flag138
(Id
, V
);
5717 end Set_Is_Packed_Array_Impl_Type
;
5719 procedure Set_Is_Param_Block_Component_Type
(Id
: E
; V
: B
:= True) is
5721 pragma Assert
(Ekind_In
(Id
, E_Void
, E_General_Access_Type
));
5722 Set_Flag215
(Id
, V
);
5723 end Set_Is_Param_Block_Component_Type
;
5725 procedure Set_Is_Partial_Invariant_Procedure
(Id
: E
; V
: B
:= True) is
5727 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5728 Set_Flag292
(Id
, V
);
5729 end Set_Is_Partial_Invariant_Procedure
;
5731 procedure Set_Is_Potentially_Use_Visible
(Id
: E
; V
: B
:= True) is
5733 pragma Assert
(Nkind
(Id
) in N_Entity
);
5735 end Set_Is_Potentially_Use_Visible
;
5737 procedure Set_Is_Predicate_Function
(Id
: E
; V
: B
:= True) is
5739 pragma Assert
(Ekind
(Id
) = E_Function
);
5740 Set_Flag255
(Id
, V
);
5741 end Set_Is_Predicate_Function
;
5743 procedure Set_Is_Predicate_Function_M
(Id
: E
; V
: B
:= True) is
5745 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5746 Set_Flag256
(Id
, V
);
5747 end Set_Is_Predicate_Function_M
;
5749 procedure Set_Is_Preelaborated
(Id
: E
; V
: B
:= True) is
5752 end Set_Is_Preelaborated
;
5754 procedure Set_Is_Primitive
(Id
: E
; V
: B
:= True) is
5757 (Is_Overloadable
(Id
)
5758 or else Ekind_In
(Id
, E_Generic_Function
, E_Generic_Procedure
));
5759 Set_Flag218
(Id
, V
);
5760 end Set_Is_Primitive
;
5762 procedure Set_Is_Primitive_Wrapper
(Id
: E
; V
: B
:= True) is
5764 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5765 Set_Flag195
(Id
, V
);
5766 end Set_Is_Primitive_Wrapper
;
5768 procedure Set_Is_Private_Composite
(Id
: E
; V
: B
:= True) is
5770 pragma Assert
(Is_Type
(Id
));
5771 Set_Flag107
(Id
, V
);
5772 end Set_Is_Private_Composite
;
5774 procedure Set_Is_Private_Descendant
(Id
: E
; V
: B
:= True) is
5777 end Set_Is_Private_Descendant
;
5779 procedure Set_Is_Private_Primitive
(Id
: E
; V
: B
:= True) is
5781 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
5782 Set_Flag245
(Id
, V
);
5783 end Set_Is_Private_Primitive
;
5785 procedure Set_Is_Public
(Id
: E
; V
: B
:= True) is
5787 pragma Assert
(Nkind
(Id
) in N_Entity
);
5791 procedure Set_Is_Pure
(Id
: E
; V
: B
:= True) is
5796 procedure Set_Is_Pure_Unit_Access_Type
(Id
: E
; V
: B
:= True) is
5798 pragma Assert
(Is_Access_Type
(Id
));
5799 Set_Flag189
(Id
, V
);
5800 end Set_Is_Pure_Unit_Access_Type
;
5802 procedure Set_Is_RACW_Stub_Type
(Id
: E
; V
: B
:= True) is
5804 pragma Assert
(Is_Type
(Id
));
5805 Set_Flag244
(Id
, V
);
5806 end Set_Is_RACW_Stub_Type
;
5808 procedure Set_Is_Raised
(Id
: E
; V
: B
:= True) is
5810 pragma Assert
(Ekind
(Id
) = E_Exception
);
5811 Set_Flag224
(Id
, V
);
5814 procedure Set_Is_Remote_Call_Interface
(Id
: E
; V
: B
:= True) is
5817 end Set_Is_Remote_Call_Interface
;
5819 procedure Set_Is_Remote_Types
(Id
: E
; V
: B
:= True) is
5822 end Set_Is_Remote_Types
;
5824 procedure Set_Is_Renaming_Of_Object
(Id
: E
; V
: B
:= True) is
5826 Set_Flag112
(Id
, V
);
5827 end Set_Is_Renaming_Of_Object
;
5829 procedure Set_Is_Return_Object
(Id
: E
; V
: B
:= True) is
5831 Set_Flag209
(Id
, V
);
5832 end Set_Is_Return_Object
;
5834 procedure Set_Is_Safe_To_Reevaluate
(Id
: E
; V
: B
:= True) is
5836 pragma Assert
(Ekind
(Id
) = E_Variable
);
5837 Set_Flag249
(Id
, V
);
5838 end Set_Is_Safe_To_Reevaluate
;
5840 procedure Set_Is_Shared_Passive
(Id
: E
; V
: B
:= True) is
5843 end Set_Is_Shared_Passive
;
5845 procedure Set_Is_Static_Type
(Id
: E
; V
: B
:= True) is
5847 pragma Assert
(Is_Type
(Id
));
5848 Set_Flag281
(Id
, V
);
5849 end Set_Is_Static_Type
;
5851 procedure Set_Is_Statically_Allocated
(Id
: E
; V
: B
:= True) is
5855 or else Ekind_In
(Id
, E_Exception
,
5860 end Set_Is_Statically_Allocated
;
5862 procedure Set_Is_Tag
(Id
: E
; V
: B
:= True) is
5864 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
5868 procedure Set_Is_Tagged_Type
(Id
: E
; V
: B
:= True) is
5871 end Set_Is_Tagged_Type
;
5873 procedure Set_Is_Thunk
(Id
: E
; V
: B
:= True) is
5875 pragma Assert
(Is_Subprogram
(Id
));
5876 Set_Flag225
(Id
, V
);
5879 procedure Set_Is_Trivial_Subprogram
(Id
: E
; V
: B
:= True) is
5881 Set_Flag235
(Id
, V
);
5882 end Set_Is_Trivial_Subprogram
;
5884 procedure Set_Is_True_Constant
(Id
: E
; V
: B
:= True) is
5886 Set_Flag163
(Id
, V
);
5887 end Set_Is_True_Constant
;
5889 procedure Set_Is_Unchecked_Union
(Id
: E
; V
: B
:= True) is
5891 pragma Assert
(Id
= Base_Type
(Id
));
5892 Set_Flag117
(Id
, V
);
5893 end Set_Is_Unchecked_Union
;
5895 procedure Set_Is_Underlying_Full_View
(Id
: E
; V
: B
:= True) is
5897 pragma Assert
(Is_Type
(Id
));
5898 Set_Flag298
(Id
, V
);
5899 end Set_Is_Underlying_Full_View
;
5901 procedure Set_Is_Underlying_Record_View
(Id
: E
; V
: B
:= True) is
5903 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
5904 Set_Flag246
(Id
, V
);
5905 end Set_Is_Underlying_Record_View
;
5907 procedure Set_Is_Unimplemented
(Id
: E
; V
: B
:= True) is
5909 Set_Flag284
(Id
, V
);
5910 end Set_Is_Unimplemented
;
5912 procedure Set_Is_Unsigned_Type
(Id
: E
; V
: B
:= True) is
5914 pragma Assert
(Is_Discrete_Or_Fixed_Point_Type
(Id
));
5915 Set_Flag144
(Id
, V
);
5916 end Set_Is_Unsigned_Type
;
5918 procedure Set_Is_Uplevel_Referenced_Entity
(Id
: E
; V
: B
:= True) is
5921 (Ekind_In
(Id
, E_Constant
, E_Variable
)
5922 or else Is_Formal
(Id
)
5923 or else Is_Type
(Id
));
5924 Set_Flag283
(Id
, V
);
5925 end Set_Is_Uplevel_Referenced_Entity
;
5927 procedure Set_Is_Valued_Procedure
(Id
: E
; V
: B
:= True) is
5929 pragma Assert
(Ekind
(Id
) = E_Procedure
);
5930 Set_Flag127
(Id
, V
);
5931 end Set_Is_Valued_Procedure
;
5933 procedure Set_Is_Visible_Formal
(Id
: E
; V
: B
:= True) is
5935 Set_Flag206
(Id
, V
);
5936 end Set_Is_Visible_Formal
;
5938 procedure Set_Is_Visible_Lib_Unit
(Id
: E
; V
: B
:= True) is
5940 Set_Flag116
(Id
, V
);
5941 end Set_Is_Visible_Lib_Unit
;
5943 procedure Set_Is_Volatile
(Id
: E
; V
: B
:= True) is
5945 pragma Assert
(Nkind
(Id
) in N_Entity
);
5947 end Set_Is_Volatile
;
5949 procedure Set_Is_Volatile_Full_Access
(Id
: E
; V
: B
:= True) is
5951 Set_Flag285
(Id
, V
);
5952 end Set_Is_Volatile_Full_Access
;
5954 procedure Set_Itype_Printed
(Id
: E
; V
: B
:= True) is
5956 pragma Assert
(Is_Itype
(Id
));
5957 Set_Flag202
(Id
, V
);
5958 end Set_Itype_Printed
;
5960 procedure Set_Kill_Elaboration_Checks
(Id
: E
; V
: B
:= True) is
5963 end Set_Kill_Elaboration_Checks
;
5965 procedure Set_Kill_Range_Checks
(Id
: E
; V
: B
:= True) is
5968 end Set_Kill_Range_Checks
;
5970 procedure Set_Known_To_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
5972 pragma Assert
(Is_Type
(Id
));
5973 Set_Flag207
(Id
, V
);
5974 end Set_Known_To_Have_Preelab_Init
;
5976 procedure Set_Last_Aggregate_Assignment
(Id
: E
; V
: N
) is
5978 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
5980 end Set_Last_Aggregate_Assignment
;
5982 procedure Set_Last_Assignment
(Id
: E
; V
: N
) is
5984 pragma Assert
(Is_Assignable
(Id
));
5986 end Set_Last_Assignment
;
5988 procedure Set_Last_Entity
(Id
: E
; V
: E
) is
5991 end Set_Last_Entity
;
5993 procedure Set_Limited_View
(Id
: E
; V
: E
) is
5995 pragma Assert
(Ekind
(Id
) = E_Package
);
5997 end Set_Limited_View
;
5999 procedure Set_Linker_Section_Pragma
(Id
: E
; V
: N
) is
6002 (Is_Object
(Id
) or else Is_Subprogram
(Id
) or else Is_Type
(Id
));
6004 end Set_Linker_Section_Pragma
;
6006 procedure Set_Lit_Indexes
(Id
: E
; V
: E
) is
6008 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
6010 end Set_Lit_Indexes
;
6012 procedure Set_Lit_Strings
(Id
: E
; V
: E
) is
6014 pragma Assert
(Is_Enumeration_Type
(Id
) and then Root_Type
(Id
) = Id
);
6016 end Set_Lit_Strings
;
6018 procedure Set_Low_Bound_Tested
(Id
: E
; V
: B
:= True) is
6020 pragma Assert
(Is_Formal
(Id
));
6021 Set_Flag205
(Id
, V
);
6022 end Set_Low_Bound_Tested
;
6024 procedure Set_Machine_Radix_10
(Id
: E
; V
: B
:= True) is
6026 pragma Assert
(Is_Decimal_Fixed_Point_Type
(Id
));
6028 end Set_Machine_Radix_10
;
6030 procedure Set_Master_Id
(Id
: E
; V
: E
) is
6032 pragma Assert
(Is_Access_Type
(Id
));
6036 procedure Set_Materialize_Entity
(Id
: E
; V
: B
:= True) is
6038 Set_Flag168
(Id
, V
);
6039 end Set_Materialize_Entity
;
6041 procedure Set_May_Inherit_Delayed_Rep_Aspects
(Id
: E
; V
: B
:= True) is
6043 Set_Flag262
(Id
, V
);
6044 end Set_May_Inherit_Delayed_Rep_Aspects
;
6046 procedure Set_Mechanism
(Id
: E
; V
: M
) is
6048 pragma Assert
(Ekind
(Id
) = E_Function
or else Is_Formal
(Id
));
6049 Set_Uint8
(Id
, UI_From_Int
(V
));
6052 procedure Set_Modulus
(Id
: E
; V
: U
) is
6054 pragma Assert
(Ekind
(Id
) = E_Modular_Integer_Type
);
6058 procedure Set_Must_Be_On_Byte_Boundary
(Id
: E
; V
: B
:= True) is
6060 pragma Assert
(Is_Type
(Id
));
6061 Set_Flag183
(Id
, V
);
6062 end Set_Must_Be_On_Byte_Boundary
;
6064 procedure Set_Must_Have_Preelab_Init
(Id
: E
; V
: B
:= True) is
6066 pragma Assert
(Is_Type
(Id
));
6067 Set_Flag208
(Id
, V
);
6068 end Set_Must_Have_Preelab_Init
;
6070 procedure Set_Needs_Debug_Info
(Id
: E
; V
: B
:= True) is
6072 Set_Flag147
(Id
, V
);
6073 end Set_Needs_Debug_Info
;
6075 procedure Set_Needs_No_Actuals
(Id
: E
; V
: B
:= True) is
6078 (Is_Overloadable
(Id
)
6079 or else Ekind_In
(Id
, E_Subprogram_Type
, E_Entry_Family
));
6081 end Set_Needs_No_Actuals
;
6083 procedure Set_Nested_Scenarios
(Id
: E
; V
: L
) is
6085 pragma Assert
(Ekind_In
(Id
, E_Function
,
6087 E_Subprogram_Body
));
6088 Set_Elist36
(Id
, V
);
6089 end Set_Nested_Scenarios
;
6091 procedure Set_Never_Set_In_Source
(Id
: E
; V
: B
:= True) is
6093 Set_Flag115
(Id
, V
);
6094 end Set_Never_Set_In_Source
;
6096 procedure Set_Next_Inlined_Subprogram
(Id
: E
; V
: E
) is
6099 end Set_Next_Inlined_Subprogram
;
6101 procedure Set_No_Dynamic_Predicate_On_Actual
(Id
: E
; V
: B
:= True) is
6103 pragma Assert
(Is_Discrete_Type
(Id
));
6104 Set_Flag276
(Id
, V
);
6105 end Set_No_Dynamic_Predicate_On_Actual
;
6107 procedure Set_No_Pool_Assigned
(Id
: E
; V
: B
:= True) is
6109 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
6110 Set_Flag131
(Id
, V
);
6111 end Set_No_Pool_Assigned
;
6113 procedure Set_No_Predicate_On_Actual
(Id
: E
; V
: B
:= True) is
6115 pragma Assert
(Is_Discrete_Type
(Id
));
6116 Set_Flag275
(Id
, V
);
6117 end Set_No_Predicate_On_Actual
;
6119 procedure Set_No_Reordering
(Id
: E
; V
: B
:= True) is
6121 pragma Assert
(Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
6122 Set_Flag239
(Id
, V
);
6123 end Set_No_Reordering
;
6125 procedure Set_No_Return
(Id
: E
; V
: B
:= True) is
6128 (V
= False or else Ekind_In
(Id
, E_Procedure
, E_Generic_Procedure
));
6129 Set_Flag113
(Id
, V
);
6132 procedure Set_No_Strict_Aliasing
(Id
: E
; V
: B
:= True) is
6134 pragma Assert
(Is_Access_Type
(Id
) and then Is_Base_Type
(Id
));
6135 Set_Flag136
(Id
, V
);
6136 end Set_No_Strict_Aliasing
;
6138 procedure Set_No_Tagged_Streams_Pragma
(Id
: E
; V
: E
) is
6140 pragma Assert
(Is_Tagged_Type
(Id
));
6142 end Set_No_Tagged_Streams_Pragma
;
6144 procedure Set_Non_Binary_Modulus
(Id
: E
; V
: B
:= True) is
6146 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
6148 end Set_Non_Binary_Modulus
;
6150 procedure Set_Non_Limited_View
(Id
: E
; V
: E
) is
6153 (Ekind
(Id
) in Incomplete_Kind
6154 or else Ekind_In
(Id
, E_Abstract_State
, E_Class_Wide_Type
));
6156 end Set_Non_Limited_View
;
6158 procedure Set_Nonzero_Is_True
(Id
: E
; V
: B
:= True) is
6161 (Root_Type
(Id
) = Standard_Boolean
6162 and then Ekind
(Id
) = E_Enumeration_Type
);
6163 Set_Flag162
(Id
, V
);
6164 end Set_Nonzero_Is_True
;
6166 procedure Set_Normalized_First_Bit
(Id
: E
; V
: U
) is
6168 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6170 end Set_Normalized_First_Bit
;
6172 procedure Set_Normalized_Position
(Id
: E
; V
: U
) is
6174 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6176 end Set_Normalized_Position
;
6178 procedure Set_Normalized_Position_Max
(Id
: E
; V
: U
) is
6180 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Discriminant
));
6182 end Set_Normalized_Position_Max
;
6184 procedure Set_OK_To_Rename
(Id
: E
; V
: B
:= True) is
6186 pragma Assert
(Ekind
(Id
) = E_Variable
);
6187 Set_Flag247
(Id
, V
);
6188 end Set_OK_To_Rename
;
6190 procedure Set_Optimize_Alignment_Space
(Id
: E
; V
: B
:= True) is
6193 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
6194 Set_Flag241
(Id
, V
);
6195 end Set_Optimize_Alignment_Space
;
6197 procedure Set_Optimize_Alignment_Time
(Id
: E
; V
: B
:= True) is
6200 (Is_Type
(Id
) or else Ekind_In
(Id
, E_Constant
, E_Variable
));
6201 Set_Flag242
(Id
, V
);
6202 end Set_Optimize_Alignment_Time
;
6204 procedure Set_Original_Access_Type
(Id
: E
; V
: E
) is
6206 pragma Assert
(Ekind
(Id
) = E_Access_Subprogram_Type
);
6208 end Set_Original_Access_Type
;
6210 procedure Set_Original_Array_Type
(Id
: E
; V
: E
) is
6212 pragma Assert
(Is_Array_Type
(Id
) or else Is_Modular_Integer_Type
(Id
));
6214 end Set_Original_Array_Type
;
6216 procedure Set_Original_Protected_Subprogram
(Id
: E
; V
: N
) is
6218 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
6220 end Set_Original_Protected_Subprogram
;
6222 procedure Set_Original_Record_Component
(Id
: E
; V
: E
) is
6224 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Component
, E_Discriminant
));
6226 end Set_Original_Record_Component
;
6228 procedure Set_Overlays_Constant
(Id
: E
; V
: B
:= True) is
6230 Set_Flag243
(Id
, V
);
6231 end Set_Overlays_Constant
;
6233 procedure Set_Overridden_Operation
(Id
: E
; V
: E
) is
6235 pragma Assert
(Is_Subprogram
(Id
) or else Is_Generic_Subprogram
(Id
));
6237 end Set_Overridden_Operation
;
6239 procedure Set_Package_Instantiation
(Id
: E
; V
: N
) is
6241 pragma Assert
(Ekind_In
(Id
, E_Void
, E_Generic_Package
, E_Package
));
6243 end Set_Package_Instantiation
;
6245 procedure Set_Packed_Array_Impl_Type
(Id
: E
; V
: E
) is
6247 pragma Assert
(Is_Array_Type
(Id
));
6249 end Set_Packed_Array_Impl_Type
;
6251 procedure Set_Parent_Subtype
(Id
: E
; V
: E
) is
6253 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
6255 end Set_Parent_Subtype
;
6257 procedure Set_Part_Of_Constituents
(Id
: E
; V
: L
) is
6259 pragma Assert
(Ekind_In
(Id
, E_Abstract_State
, E_Variable
));
6260 Set_Elist10
(Id
, V
);
6261 end Set_Part_Of_Constituents
;
6263 procedure Set_Part_Of_References
(Id
: E
; V
: L
) is
6265 pragma Assert
(Ekind
(Id
) = E_Variable
);
6266 Set_Elist11
(Id
, V
);
6267 end Set_Part_Of_References
;
6269 procedure Set_Partial_View_Has_Unknown_Discr
(Id
: E
; V
: B
:= True) is
6271 pragma Assert
(Is_Type
(Id
));
6272 Set_Flag280
(Id
, V
);
6273 end Set_Partial_View_Has_Unknown_Discr
;
6275 procedure Set_Pending_Access_Types
(Id
: E
; V
: L
) is
6277 pragma Assert
(Is_Type
(Id
));
6278 Set_Elist15
(Id
, V
);
6279 end Set_Pending_Access_Types
;
6281 procedure Set_Postconditions_Proc
(Id
: E
; V
: E
) is
6283 pragma Assert
(Ekind_In
(Id
, E_Entry
,
6288 end Set_Postconditions_Proc
;
6290 procedure Set_Predicates_Ignored
(Id
: E
; V
: B
) is
6292 pragma Assert
(Is_Type
(Id
));
6293 Set_Flag288
(Id
, V
);
6294 end Set_Predicates_Ignored
;
6296 procedure Set_Direct_Primitive_Operations
(Id
: E
; V
: L
) is
6298 pragma Assert
(Is_Tagged_Type
(Id
));
6299 Set_Elist10
(Id
, V
);
6300 end Set_Direct_Primitive_Operations
;
6302 procedure Set_Prival
(Id
: E
; V
: E
) is
6304 pragma Assert
(Is_Protected_Component
(Id
));
6308 procedure Set_Prival_Link
(Id
: E
; V
: E
) is
6310 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6312 end Set_Prival_Link
;
6314 procedure Set_Private_Dependents
(Id
: E
; V
: L
) is
6316 pragma Assert
(Is_Incomplete_Or_Private_Type
(Id
));
6317 Set_Elist18
(Id
, V
);
6318 end Set_Private_Dependents
;
6320 procedure Set_Private_View
(Id
: E
; V
: N
) is
6322 pragma Assert
(Is_Private_Type
(Id
));
6324 end Set_Private_View
;
6326 procedure Set_Protected_Body_Subprogram
(Id
: E
; V
: E
) is
6328 pragma Assert
(Is_Subprogram
(Id
) or else Is_Entry
(Id
));
6330 end Set_Protected_Body_Subprogram
;
6332 procedure Set_Protected_Formal
(Id
: E
; V
: E
) is
6334 pragma Assert
(Is_Formal
(Id
));
6336 end Set_Protected_Formal
;
6338 procedure Set_Protected_Subprogram
(Id
: E
; V
: E
) is
6340 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
));
6342 end Set_Protected_Subprogram
;
6344 procedure Set_Protection_Object
(Id
: E
; V
: E
) is
6346 pragma Assert
(Ekind_In
(Id
, E_Entry
,
6351 end Set_Protection_Object
;
6353 procedure Set_Reachable
(Id
: E
; V
: B
:= True) is
6358 procedure Set_Receiving_Entry
(Id
: E
; V
: E
) is
6360 pragma Assert
(Ekind
(Id
) = E_Procedure
);
6362 end Set_Receiving_Entry
;
6364 procedure Set_Referenced
(Id
: E
; V
: B
:= True) is
6366 Set_Flag156
(Id
, V
);
6369 procedure Set_Referenced_As_LHS
(Id
: E
; V
: B
:= True) is
6372 end Set_Referenced_As_LHS
;
6374 procedure Set_Referenced_As_Out_Parameter
(Id
: E
; V
: B
:= True) is
6376 Set_Flag227
(Id
, V
);
6377 end Set_Referenced_As_Out_Parameter
;
6379 procedure Set_Refinement_Constituents
(Id
: E
; V
: L
) is
6381 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
6383 end Set_Refinement_Constituents
;
6385 procedure Set_Register_Exception_Call
(Id
: E
; V
: N
) is
6387 pragma Assert
(Ekind
(Id
) = E_Exception
);
6389 end Set_Register_Exception_Call
;
6391 procedure Set_Related_Array_Object
(Id
: E
; V
: E
) is
6393 pragma Assert
(Is_Array_Type
(Id
));
6395 end Set_Related_Array_Object
;
6397 procedure Set_Related_Expression
(Id
: E
; V
: N
) is
6399 pragma Assert
(Ekind
(Id
) in Type_Kind
6400 or else Ekind_In
(Id
, E_Constant
, E_Variable
, E_Void
));
6402 end Set_Related_Expression
;
6404 procedure Set_Related_Instance
(Id
: E
; V
: E
) is
6406 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Package_Body
));
6408 end Set_Related_Instance
;
6410 procedure Set_Related_Type
(Id
: E
; V
: E
) is
6412 pragma Assert
(Ekind_In
(Id
, E_Component
, E_Constant
, E_Variable
));
6414 end Set_Related_Type
;
6416 procedure Set_Relative_Deadline_Variable
(Id
: E
; V
: E
) is
6418 pragma Assert
(Is_Task_Type
(Id
) and then Is_Base_Type
(Id
));
6420 end Set_Relative_Deadline_Variable
;
6422 procedure Set_Renamed_Entity
(Id
: E
; V
: N
) is
6425 end Set_Renamed_Entity
;
6427 procedure Set_Renamed_In_Spec
(Id
: E
; V
: B
:= True) is
6429 pragma Assert
(Ekind
(Id
) = E_Package
);
6430 Set_Flag231
(Id
, V
);
6431 end Set_Renamed_In_Spec
;
6433 procedure Set_Renamed_Object
(Id
: E
; V
: N
) is
6436 end Set_Renamed_Object
;
6438 procedure Set_Renaming_Map
(Id
: E
; V
: U
) is
6441 end Set_Renaming_Map
;
6443 procedure Set_Requires_Overriding
(Id
: E
; V
: B
:= True) is
6445 pragma Assert
(Is_Overloadable
(Id
));
6446 Set_Flag213
(Id
, V
);
6447 end Set_Requires_Overriding
;
6449 procedure Set_Return_Present
(Id
: E
; V
: B
:= True) is
6452 end Set_Return_Present
;
6454 procedure Set_Return_Applies_To
(Id
: E
; V
: N
) is
6457 end Set_Return_Applies_To
;
6459 procedure Set_Returns_By_Ref
(Id
: E
; V
: B
:= True) is
6462 end Set_Returns_By_Ref
;
6464 procedure Set_Reverse_Bit_Order
(Id
: E
; V
: B
:= True) is
6467 (Is_Record_Type
(Id
) and then Is_Base_Type
(Id
));
6468 Set_Flag164
(Id
, V
);
6469 end Set_Reverse_Bit_Order
;
6471 procedure Set_Reverse_Storage_Order
(Id
: E
; V
: B
:= True) is
6475 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6477 end Set_Reverse_Storage_Order
;
6479 procedure Set_Rewritten_For_C
(Id
: E
; V
: B
:= True) is
6481 pragma Assert
(Ekind
(Id
) = E_Function
);
6482 Set_Flag287
(Id
, V
);
6483 end Set_Rewritten_For_C
;
6485 procedure Set_RM_Size
(Id
: E
; V
: U
) is
6487 pragma Assert
(Is_Type
(Id
));
6491 procedure Set_Scalar_Range
(Id
: E
; V
: N
) is
6494 end Set_Scalar_Range
;
6496 procedure Set_Scale_Value
(Id
: E
; V
: U
) is
6499 end Set_Scale_Value
;
6501 procedure Set_Scope_Depth_Value
(Id
: E
; V
: U
) is
6503 pragma Assert
(not Is_Record_Type
(Id
));
6505 end Set_Scope_Depth_Value
;
6507 procedure Set_Sec_Stack_Needed_For_Return
(Id
: E
; V
: B
:= True) is
6509 Set_Flag167
(Id
, V
);
6510 end Set_Sec_Stack_Needed_For_Return
;
6512 procedure Set_Shadow_Entities
(Id
: E
; V
: S
) is
6514 pragma Assert
(Ekind_In
(Id
, E_Package
, E_Generic_Package
));
6516 end Set_Shadow_Entities
;
6518 procedure Set_Shared_Var_Procs_Instance
(Id
: E
; V
: E
) is
6520 pragma Assert
(Ekind
(Id
) = E_Variable
);
6522 end Set_Shared_Var_Procs_Instance
;
6524 procedure Set_Size_Check_Code
(Id
: E
; V
: N
) is
6526 pragma Assert
(Ekind_In
(Id
, E_Constant
, E_Variable
));
6528 end Set_Size_Check_Code
;
6530 procedure Set_Size_Depends_On_Discriminant
(Id
: E
; V
: B
:= True) is
6532 Set_Flag177
(Id
, V
);
6533 end Set_Size_Depends_On_Discriminant
;
6535 procedure Set_Size_Known_At_Compile_Time
(Id
: E
; V
: B
:= True) is
6538 end Set_Size_Known_At_Compile_Time
;
6540 procedure Set_Small_Value
(Id
: E
; V
: R
) is
6542 pragma Assert
(Is_Fixed_Point_Type
(Id
));
6543 Set_Ureal21
(Id
, V
);
6544 end Set_Small_Value
;
6546 procedure Set_SPARK_Aux_Pragma
(Id
: E
; V
: N
) is
6549 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent variants
6552 Ekind_In
(Id
, E_Generic_Package
, -- package variants
6556 end Set_SPARK_Aux_Pragma
;
6558 procedure Set_SPARK_Aux_Pragma_Inherited
(Id
: E
; V
: B
:= True) is
6561 (Ekind_In
(Id
, E_Protected_Type
, -- concurrent variants
6564 Ekind_In
(Id
, E_Generic_Package
, -- package variants
6567 Set_Flag266
(Id
, V
);
6568 end Set_SPARK_Aux_Pragma_Inherited
;
6570 procedure Set_SPARK_Pragma
(Id
: E
; V
: N
) is
6573 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent variants
6578 Ekind_In
(Id
, E_Constant
, -- object variants
6581 Ekind_In
(Id
, E_Entry
, -- overloadable variants
6585 E_Generic_Procedure
,
6590 Ekind_In
(Id
, E_Generic_Package
, -- package variants
6594 Ekind
(Id
) = E_Void
); -- special purpose
6596 end Set_SPARK_Pragma
;
6598 procedure Set_SPARK_Pragma_Inherited
(Id
: E
; V
: B
:= True) is
6601 (Ekind_In
(Id
, E_Protected_Body
, -- concurrent variants
6606 Ekind_In
(Id
, E_Constant
, -- object variants
6609 Ekind_In
(Id
, E_Entry
, -- overloadable variants
6613 E_Generic_Procedure
,
6618 Ekind_In
(Id
, E_Generic_Package
, -- package variants
6622 Ekind
(Id
) = E_Void
); -- special purpose
6623 Set_Flag265
(Id
, V
);
6624 end Set_SPARK_Pragma_Inherited
;
6626 procedure Set_Spec_Entity
(Id
: E
; V
: E
) is
6628 pragma Assert
(Ekind
(Id
) = E_Package_Body
or else Is_Formal
(Id
));
6630 end Set_Spec_Entity
;
6632 procedure Set_SSO_Set_High_By_Default
(Id
: E
; V
: B
:= True) is
6636 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6637 Set_Flag273
(Id
, V
);
6638 end Set_SSO_Set_High_By_Default
;
6640 procedure Set_SSO_Set_Low_By_Default
(Id
: E
; V
: B
:= True) is
6644 and then (Is_Record_Type
(Id
) or else Is_Array_Type
(Id
)));
6645 Set_Flag272
(Id
, V
);
6646 end Set_SSO_Set_Low_By_Default
;
6648 procedure Set_Static_Discrete_Predicate
(Id
: E
; V
: S
) is
6650 pragma Assert
(Is_Discrete_Type
(Id
) and then Has_Predicates
(Id
));
6652 end Set_Static_Discrete_Predicate
;
6654 procedure Set_Static_Real_Or_String_Predicate
(Id
: E
; V
: N
) is
6656 pragma Assert
((Is_Real_Type
(Id
) or else Is_String_Type
(Id
))
6657 and then Has_Predicates
(Id
));
6659 end Set_Static_Real_Or_String_Predicate
;
6661 procedure Set_Status_Flag_Or_Transient_Decl
(Id
: E
; V
: E
) is
6663 pragma Assert
(Ekind_In
(Id
, E_Constant
,
6667 end Set_Status_Flag_Or_Transient_Decl
;
6669 procedure Set_Storage_Size_Variable
(Id
: E
; V
: E
) is
6671 pragma Assert
(Is_Access_Type
(Id
) or else Is_Task_Type
(Id
));
6672 pragma Assert
(Id
= Base_Type
(Id
));
6674 end Set_Storage_Size_Variable
;
6676 procedure Set_Static_Elaboration_Desired
(Id
: E
; V
: B
) is
6678 pragma Assert
(Ekind
(Id
) = E_Package
);
6680 end Set_Static_Elaboration_Desired
;
6682 procedure Set_Static_Initialization
(Id
: E
; V
: N
) is
6685 (Ekind
(Id
) = E_Procedure
and then not Is_Dispatching_Operation
(Id
));
6687 end Set_Static_Initialization
;
6689 procedure Set_Stored_Constraint
(Id
: E
; V
: L
) is
6691 pragma Assert
(Nkind
(Id
) in N_Entity
);
6692 Set_Elist23
(Id
, V
);
6693 end Set_Stored_Constraint
;
6695 procedure Set_Stores_Attribute_Old_Prefix
(Id
: E
; V
: B
:= True) is
6697 pragma Assert
(Ekind
(Id
) = E_Constant
);
6698 Set_Flag270
(Id
, V
);
6699 end Set_Stores_Attribute_Old_Prefix
;
6701 procedure Set_Strict_Alignment
(Id
: E
; V
: B
:= True) is
6703 pragma Assert
(Id
= Base_Type
(Id
));
6704 Set_Flag145
(Id
, V
);
6705 end Set_Strict_Alignment
;
6707 procedure Set_String_Literal_Length
(Id
: E
; V
: U
) is
6709 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
6711 end Set_String_Literal_Length
;
6713 procedure Set_String_Literal_Low_Bound
(Id
: E
; V
: N
) is
6715 pragma Assert
(Ekind
(Id
) = E_String_Literal_Subtype
);
6717 end Set_String_Literal_Low_Bound
;
6719 procedure Set_Subprograms_For_Type
(Id
: E
; V
: L
) is
6721 pragma Assert
(Is_Type
(Id
));
6722 Set_Elist29
(Id
, V
);
6723 end Set_Subprograms_For_Type
;
6725 procedure Set_Subps_Index
(Id
: E
; V
: U
) is
6727 pragma Assert
(Is_Subprogram
(Id
));
6729 end Set_Subps_Index
;
6731 procedure Set_Suppress_Initialization
(Id
: E
; V
: B
:= True) is
6733 pragma Assert
(Is_Type
(Id
) or else Ekind
(Id
) = E_Variable
);
6734 Set_Flag105
(Id
, V
);
6735 end Set_Suppress_Initialization
;
6737 procedure Set_Suppress_Style_Checks
(Id
: E
; V
: B
:= True) is
6739 Set_Flag165
(Id
, V
);
6740 end Set_Suppress_Style_Checks
;
6742 procedure Set_Suppress_Value_Tracking_On_Call
(Id
: E
; V
: B
:= True) is
6744 Set_Flag217
(Id
, V
);
6745 end Set_Suppress_Value_Tracking_On_Call
;
6747 procedure Set_Task_Body_Procedure
(Id
: E
; V
: N
) is
6749 pragma Assert
(Ekind
(Id
) in Task_Kind
);
6751 end Set_Task_Body_Procedure
;
6753 procedure Set_Thunk_Entity
(Id
: E
; V
: E
) is
6755 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
6756 and then Is_Thunk
(Id
));
6758 end Set_Thunk_Entity
;
6760 procedure Set_Treat_As_Volatile
(Id
: E
; V
: B
:= True) is
6763 end Set_Treat_As_Volatile
;
6765 procedure Set_Underlying_Full_View
(Id
: E
; V
: E
) is
6767 pragma Assert
(Ekind
(Id
) in Private_Kind
);
6769 end Set_Underlying_Full_View
;
6771 procedure Set_Underlying_Record_View
(Id
: E
; V
: E
) is
6773 pragma Assert
(Ekind
(Id
) = E_Record_Type
);
6775 end Set_Underlying_Record_View
;
6777 procedure Set_Universal_Aliasing
(Id
: E
; V
: B
:= True) is
6779 pragma Assert
(Is_Type
(Id
) and then Is_Base_Type
(Id
));
6780 Set_Flag216
(Id
, V
);
6781 end Set_Universal_Aliasing
;
6783 procedure Set_Unset_Reference
(Id
: E
; V
: N
) is
6786 end Set_Unset_Reference
;
6788 procedure Set_Used_As_Generic_Actual
(Id
: E
; V
: B
:= True) is
6790 Set_Flag222
(Id
, V
);
6791 end Set_Used_As_Generic_Actual
;
6793 procedure Set_Uses_Lock_Free
(Id
: E
; V
: B
:= True) is
6795 pragma Assert
(Ekind
(Id
) = E_Protected_Type
);
6796 Set_Flag188
(Id
, V
);
6797 end Set_Uses_Lock_Free
;
6799 procedure Set_Uses_Sec_Stack
(Id
: E
; V
: B
:= True) is
6802 end Set_Uses_Sec_Stack
;
6804 procedure Set_Validated_Object
(Id
: E
; V
: N
) is
6806 pragma Assert
(Ekind
(Id
) = E_Variable
);
6808 end Set_Validated_Object
;
6810 procedure Set_Warnings_Off
(Id
: E
; V
: B
:= True) is
6813 end Set_Warnings_Off
;
6815 procedure Set_Warnings_Off_Used
(Id
: E
; V
: B
:= True) is
6817 Set_Flag236
(Id
, V
);
6818 end Set_Warnings_Off_Used
;
6820 procedure Set_Warnings_Off_Used_Unmodified
(Id
: E
; V
: B
:= True) is
6822 Set_Flag237
(Id
, V
);
6823 end Set_Warnings_Off_Used_Unmodified
;
6825 procedure Set_Warnings_Off_Used_Unreferenced
(Id
: E
; V
: B
:= True) is
6827 Set_Flag238
(Id
, V
);
6828 end Set_Warnings_Off_Used_Unreferenced
;
6830 procedure Set_Was_Hidden
(Id
: E
; V
: B
:= True) is
6832 Set_Flag196
(Id
, V
);
6835 procedure Set_Wrapped_Entity
(Id
: E
; V
: E
) is
6837 pragma Assert
(Ekind_In
(Id
, E_Function
, E_Procedure
)
6838 and then Is_Primitive_Wrapper
(Id
));
6840 end Set_Wrapped_Entity
;
6842 -----------------------------------
6843 -- Field Initialization Routines --
6844 -----------------------------------
6846 procedure Init_Alignment
(Id
: E
) is
6848 Set_Uint14
(Id
, Uint_0
);
6851 procedure Init_Alignment
(Id
: E
; V
: Int
) is
6853 Set_Uint14
(Id
, UI_From_Int
(V
));
6856 procedure Init_Component_Bit_Offset
(Id
: E
) is
6858 Set_Uint11
(Id
, No_Uint
);
6859 end Init_Component_Bit_Offset
;
6861 procedure Init_Component_Bit_Offset
(Id
: E
; V
: Int
) is
6863 Set_Uint11
(Id
, UI_From_Int
(V
));
6864 end Init_Component_Bit_Offset
;
6866 procedure Init_Component_Size
(Id
: E
) is
6868 Set_Uint22
(Id
, Uint_0
);
6869 end Init_Component_Size
;
6871 procedure Init_Component_Size
(Id
: E
; V
: Int
) is
6873 Set_Uint22
(Id
, UI_From_Int
(V
));
6874 end Init_Component_Size
;
6876 procedure Init_Digits_Value
(Id
: E
) is
6878 Set_Uint17
(Id
, Uint_0
);
6879 end Init_Digits_Value
;
6881 procedure Init_Digits_Value
(Id
: E
; V
: Int
) is
6883 Set_Uint17
(Id
, UI_From_Int
(V
));
6884 end Init_Digits_Value
;
6886 procedure Init_Esize
(Id
: E
) is
6888 Set_Uint12
(Id
, Uint_0
);
6891 procedure Init_Esize
(Id
: E
; V
: Int
) is
6893 Set_Uint12
(Id
, UI_From_Int
(V
));
6896 procedure Init_Normalized_First_Bit
(Id
: E
) is
6898 Set_Uint8
(Id
, No_Uint
);
6899 end Init_Normalized_First_Bit
;
6901 procedure Init_Normalized_First_Bit
(Id
: E
; V
: Int
) is
6903 Set_Uint8
(Id
, UI_From_Int
(V
));
6904 end Init_Normalized_First_Bit
;
6906 procedure Init_Normalized_Position
(Id
: E
) is
6908 Set_Uint14
(Id
, No_Uint
);
6909 end Init_Normalized_Position
;
6911 procedure Init_Normalized_Position
(Id
: E
; V
: Int
) is
6913 Set_Uint14
(Id
, UI_From_Int
(V
));
6914 end Init_Normalized_Position
;
6916 procedure Init_Normalized_Position_Max
(Id
: E
) is
6918 Set_Uint10
(Id
, No_Uint
);
6919 end Init_Normalized_Position_Max
;
6921 procedure Init_Normalized_Position_Max
(Id
: E
; V
: Int
) is
6923 Set_Uint10
(Id
, UI_From_Int
(V
));
6924 end Init_Normalized_Position_Max
;
6926 procedure Init_RM_Size
(Id
: E
) is
6928 Set_Uint13
(Id
, Uint_0
);
6931 procedure Init_RM_Size
(Id
: E
; V
: Int
) is
6933 Set_Uint13
(Id
, UI_From_Int
(V
));
6936 -----------------------------
6937 -- Init_Component_Location --
6938 -----------------------------
6940 procedure Init_Component_Location
(Id
: E
) is
6942 Set_Uint8
(Id
, No_Uint
); -- Normalized_First_Bit
6943 Set_Uint10
(Id
, No_Uint
); -- Normalized_Position_Max
6944 Set_Uint11
(Id
, No_Uint
); -- Component_Bit_Offset
6945 Set_Uint12
(Id
, Uint_0
); -- Esize
6946 Set_Uint14
(Id
, No_Uint
); -- Normalized_Position
6947 end Init_Component_Location
;
6949 ----------------------------
6950 -- Init_Object_Size_Align --
6951 ----------------------------
6953 procedure Init_Object_Size_Align
(Id
: E
) is
6955 Set_Uint12
(Id
, Uint_0
); -- Esize
6956 Set_Uint14
(Id
, Uint_0
); -- Alignment
6957 end Init_Object_Size_Align
;
6963 procedure Init_Size
(Id
: E
; V
: Int
) is
6965 pragma Assert
(not Is_Object
(Id
));
6966 Set_Uint12
(Id
, UI_From_Int
(V
)); -- Esize
6967 Set_Uint13
(Id
, UI_From_Int
(V
)); -- RM_Size
6970 ---------------------
6971 -- Init_Size_Align --
6972 ---------------------
6974 procedure Init_Size_Align
(Id
: E
) is
6976 pragma Assert
(not Is_Object
(Id
));
6977 Set_Uint12
(Id
, Uint_0
); -- Esize
6978 Set_Uint13
(Id
, Uint_0
); -- RM_Size
6979 Set_Uint14
(Id
, Uint_0
); -- Alignment
6980 end Init_Size_Align
;
6982 ----------------------------------------------
6983 -- Type Representation Attribute Predicates --
6984 ----------------------------------------------
6986 function Known_Alignment
(E
: Entity_Id
) return B
is
6988 return Uint14
(E
) /= Uint_0
6989 and then Uint14
(E
) /= No_Uint
;
6990 end Known_Alignment
;
6992 function Known_Component_Bit_Offset
(E
: Entity_Id
) return B
is
6994 return Uint11
(E
) /= No_Uint
;
6995 end Known_Component_Bit_Offset
;
6997 function Known_Component_Size
(E
: Entity_Id
) return B
is
6999 return Uint22
(Base_Type
(E
)) /= Uint_0
7000 and then Uint22
(Base_Type
(E
)) /= No_Uint
;
7001 end Known_Component_Size
;
7003 function Known_Esize
(E
: Entity_Id
) return B
is
7005 return Uint12
(E
) /= Uint_0
7006 and then Uint12
(E
) /= No_Uint
;
7009 function Known_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7011 return Uint8
(E
) /= No_Uint
;
7012 end Known_Normalized_First_Bit
;
7014 function Known_Normalized_Position
(E
: Entity_Id
) return B
is
7016 return Uint14
(E
) /= No_Uint
;
7017 end Known_Normalized_Position
;
7019 function Known_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7021 return Uint10
(E
) /= No_Uint
;
7022 end Known_Normalized_Position_Max
;
7024 function Known_RM_Size
(E
: Entity_Id
) return B
is
7026 return Uint13
(E
) /= No_Uint
7027 and then (Uint13
(E
) /= Uint_0
7028 or else Is_Discrete_Type
(E
)
7029 or else Is_Fixed_Point_Type
(E
));
7032 function Known_Static_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7034 return Uint11
(E
) /= No_Uint
7035 and then Uint11
(E
) >= Uint_0
;
7036 end Known_Static_Component_Bit_Offset
;
7038 function Known_Static_Component_Size
(E
: Entity_Id
) return B
is
7040 return Uint22
(Base_Type
(E
)) > Uint_0
;
7041 end Known_Static_Component_Size
;
7043 function Known_Static_Esize
(E
: Entity_Id
) return B
is
7045 return Uint12
(E
) > Uint_0
7046 and then not Is_Generic_Type
(E
);
7047 end Known_Static_Esize
;
7049 function Known_Static_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7051 return Uint8
(E
) /= No_Uint
7052 and then Uint8
(E
) >= Uint_0
;
7053 end Known_Static_Normalized_First_Bit
;
7055 function Known_Static_Normalized_Position
(E
: Entity_Id
) return B
is
7057 return Uint14
(E
) /= No_Uint
7058 and then Uint14
(E
) >= Uint_0
;
7059 end Known_Static_Normalized_Position
;
7061 function Known_Static_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7063 return Uint10
(E
) /= No_Uint
7064 and then Uint10
(E
) >= Uint_0
;
7065 end Known_Static_Normalized_Position_Max
;
7067 function Known_Static_RM_Size
(E
: Entity_Id
) return B
is
7069 return (Uint13
(E
) > Uint_0
7070 or else Is_Discrete_Type
(E
)
7071 or else Is_Fixed_Point_Type
(E
))
7072 and then not Is_Generic_Type
(E
);
7073 end Known_Static_RM_Size
;
7075 function Unknown_Alignment
(E
: Entity_Id
) return B
is
7077 return Uint14
(E
) = Uint_0
7078 or else Uint14
(E
) = No_Uint
;
7079 end Unknown_Alignment
;
7081 function Unknown_Component_Bit_Offset
(E
: Entity_Id
) return B
is
7083 return Uint11
(E
) = No_Uint
;
7084 end Unknown_Component_Bit_Offset
;
7086 function Unknown_Component_Size
(E
: Entity_Id
) return B
is
7088 return Uint22
(Base_Type
(E
)) = Uint_0
7090 Uint22
(Base_Type
(E
)) = No_Uint
;
7091 end Unknown_Component_Size
;
7093 function Unknown_Esize
(E
: Entity_Id
) return B
is
7095 return Uint12
(E
) = No_Uint
7097 Uint12
(E
) = Uint_0
;
7100 function Unknown_Normalized_First_Bit
(E
: Entity_Id
) return B
is
7102 return Uint8
(E
) = No_Uint
;
7103 end Unknown_Normalized_First_Bit
;
7105 function Unknown_Normalized_Position
(E
: Entity_Id
) return B
is
7107 return Uint14
(E
) = No_Uint
;
7108 end Unknown_Normalized_Position
;
7110 function Unknown_Normalized_Position_Max
(E
: Entity_Id
) return B
is
7112 return Uint10
(E
) = No_Uint
;
7113 end Unknown_Normalized_Position_Max
;
7115 function Unknown_RM_Size
(E
: Entity_Id
) return B
is
7117 return (Uint13
(E
) = Uint_0
7118 and then not Is_Discrete_Type
(E
)
7119 and then not Is_Fixed_Point_Type
(E
))
7120 or else Uint13
(E
) = No_Uint
;
7121 end Unknown_RM_Size
;
7123 --------------------
7124 -- Address_Clause --
7125 --------------------
7127 function Address_Clause
(Id
: E
) return N
is
7129 return Get_Attribute_Definition_Clause
(Id
, Attribute_Address
);
7136 function Aft_Value
(Id
: E
) return U
is
7138 Delta_Val
: Ureal
:= Delta_Value
(Id
);
7140 while Delta_Val
< Ureal_Tenth
loop
7141 Delta_Val
:= Delta_Val
* Ureal_10
;
7142 Result
:= Result
+ 1;
7145 return UI_From_Int
(Result
);
7148 ----------------------
7149 -- Alignment_Clause --
7150 ----------------------
7152 function Alignment_Clause
(Id
: E
) return N
is
7154 return Get_Attribute_Definition_Clause
(Id
, Attribute_Alignment
);
7155 end Alignment_Clause
;
7161 procedure Append_Entity
(Id
: Entity_Id
; V
: Entity_Id
) is
7163 if Last_Entity
(V
) = Empty
then
7164 Set_First_Entity
(Id
=> V
, V
=> Id
);
7166 Set_Next_Entity
(Last_Entity
(V
), Id
);
7169 Set_Next_Entity
(Id
, Empty
);
7171 Set_Last_Entity
(Id
=> V
, V
=> Id
);
7178 function Base_Type
(Id
: E
) return E
is
7180 if Is_Base_Type
(Id
) then
7183 pragma Assert
(Is_Type
(Id
));
7188 -------------------------
7189 -- Component_Alignment --
7190 -------------------------
7192 -- Component Alignment is encoded using two flags, Flag128/129 as
7193 -- follows. Note that both flags False = Align_Default, so that the
7194 -- default initialization of flags to False initializes component
7195 -- alignment to the default value as required.
7197 -- Flag128 Flag129 Value
7198 -- ------- ------- -----
7199 -- False False Calign_Default
7200 -- False True Calign_Component_Size
7201 -- True False Calign_Component_Size_4
7202 -- True True Calign_Storage_Unit
7204 function Component_Alignment
(Id
: E
) return C
is
7205 BT
: constant Node_Id
:= Base_Type
(Id
);
7208 pragma Assert
(Is_Array_Type
(Id
) or else Is_Record_Type
(Id
));
7210 if Flag128
(BT
) then
7211 if Flag129
(BT
) then
7212 return Calign_Storage_Unit
;
7214 return Calign_Component_Size_4
;
7218 if Flag129
(BT
) then
7219 return Calign_Component_Size
;
7221 return Calign_Default
;
7224 end Component_Alignment
;
7226 ----------------------
7227 -- Declaration_Node --
7228 ----------------------
7230 function Declaration_Node
(Id
: E
) return N
is
7234 if Ekind
(Id
) = E_Incomplete_Type
7235 and then Present
(Full_View
(Id
))
7237 P
:= Parent
(Full_View
(Id
));
7243 if Nkind_In
(P
, N_Selected_Component
, N_Expanded_Name
)
7244 or else (Nkind
(P
) = N_Defining_Program_Unit_Name
7245 and then Is_Child_Unit
(Id
))
7252 end Declaration_Node
;
7254 ---------------------
7255 -- Designated_Type --
7256 ---------------------
7258 function Designated_Type
(Id
: E
) return E
is
7262 Desig_Type
:= Directly_Designated_Type
(Id
);
7264 if Is_Incomplete_Type
(Desig_Type
)
7265 and then Present
(Full_View
(Desig_Type
))
7267 return Full_View
(Desig_Type
);
7269 elsif Is_Class_Wide_Type
(Desig_Type
)
7270 and then Is_Incomplete_Type
(Etype
(Desig_Type
))
7271 and then Present
(Full_View
(Etype
(Desig_Type
)))
7272 and then Present
(Class_Wide_Type
(Full_View
(Etype
(Desig_Type
))))
7274 return Class_Wide_Type
(Full_View
(Etype
(Desig_Type
)));
7279 end Designated_Type
;
7285 function DIC_Procedure
(Id
: E
) return E
is
7286 Subp_Elmt
: Elmt_Id
;
7287 Subp_Id
: Entity_Id
;
7291 pragma Assert
(Is_Type
(Id
));
7293 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
7295 if Present
(Subps
) then
7296 Subp_Elmt
:= First_Elmt
(Subps
);
7297 while Present
(Subp_Elmt
) loop
7298 Subp_Id
:= Node
(Subp_Elmt
);
7300 if Is_DIC_Procedure
(Subp_Id
) then
7304 Next_Elmt
(Subp_Elmt
);
7311 ----------------------
7312 -- Entry_Index_Type --
7313 ----------------------
7315 function Entry_Index_Type
(Id
: E
) return N
is
7317 pragma Assert
(Ekind
(Id
) = E_Entry_Family
);
7318 return Etype
(Discrete_Subtype_Definition
(Parent
(Id
)));
7319 end Entry_Index_Type
;
7321 ---------------------
7322 -- First_Component --
7323 ---------------------
7325 function First_Component
(Id
: E
) return E
is
7330 (Is_Concurrent_Type
(Id
)
7331 or else Is_Incomplete_Or_Private_Type
(Id
)
7332 or else Is_Record_Type
(Id
));
7334 Comp_Id
:= First_Entity
(Id
);
7335 while Present
(Comp_Id
) loop
7336 exit when Ekind
(Comp_Id
) = E_Component
;
7337 Comp_Id
:= Next_Entity
(Comp_Id
);
7341 end First_Component
;
7343 -------------------------------------
7344 -- First_Component_Or_Discriminant --
7345 -------------------------------------
7347 function First_Component_Or_Discriminant
(Id
: E
) return E
is
7352 (Is_Concurrent_Type
(Id
)
7353 or else Is_Incomplete_Or_Private_Type
(Id
)
7354 or else Is_Record_Type
(Id
)
7355 or else Has_Discriminants
(Id
));
7357 Comp_Id
:= First_Entity
(Id
);
7358 while Present
(Comp_Id
) loop
7359 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
7360 Comp_Id
:= Next_Entity
(Comp_Id
);
7364 end First_Component_Or_Discriminant
;
7370 function First_Formal
(Id
: E
) return E
is
7375 (Is_Generic_Subprogram
(Id
)
7376 or else Is_Overloadable
(Id
)
7377 or else Ekind_In
(Id
, E_Entry_Family
,
7379 E_Subprogram_Type
));
7381 if Ekind
(Id
) = E_Enumeration_Literal
then
7385 Formal
:= First_Entity
(Id
);
7387 -- Deal with the common, non-generic case first
7389 if No
(Formal
) or else Is_Formal
(Formal
) then
7393 -- The first/next entity chain of a generic subprogram contains all
7394 -- generic formal parameters, followed by the formal parameters.
7396 if Is_Generic_Subprogram
(Id
) then
7397 while Present
(Formal
) and then not Is_Formal
(Formal
) loop
7398 Next_Entity
(Formal
);
7407 ------------------------------
7408 -- First_Formal_With_Extras --
7409 ------------------------------
7411 function First_Formal_With_Extras
(Id
: E
) return E
is
7416 (Is_Generic_Subprogram
(Id
)
7417 or else Is_Overloadable
(Id
)
7418 or else Ekind_In
(Id
, E_Entry_Family
,
7420 E_Subprogram_Type
));
7422 if Ekind
(Id
) = E_Enumeration_Literal
then
7426 Formal
:= First_Entity
(Id
);
7428 -- The first/next entity chain of a generic subprogram contains all
7429 -- generic formal parameters, followed by the formal parameters. Go
7430 -- directly to the parameters by skipping the formal part.
7432 if Is_Generic_Subprogram
(Id
) then
7433 while Present
(Formal
) and then not Is_Formal
(Formal
) loop
7434 Next_Entity
(Formal
);
7438 if Present
(Formal
) and then Is_Formal
(Formal
) then
7441 return Extra_Formals
(Id
); -- Empty if no extra formals
7444 end First_Formal_With_Extras
;
7446 -------------------------------------
7447 -- Get_Attribute_Definition_Clause --
7448 -------------------------------------
7450 function Get_Attribute_Definition_Clause
7452 Id
: Attribute_Id
) return Node_Id
7457 N
:= First_Rep_Item
(E
);
7458 while Present
(N
) loop
7459 if Nkind
(N
) = N_Attribute_Definition_Clause
7460 and then Get_Attribute_Id
(Chars
(N
)) = Id
7469 end Get_Attribute_Definition_Clause
;
7471 ---------------------------
7472 -- Get_Class_Wide_Pragma --
7473 ---------------------------
7475 function Get_Class_Wide_Pragma
7477 Id
: Pragma_Id
) return Node_Id
7483 Items
:= Contract
(E
);
7489 Item
:= Pre_Post_Conditions
(Items
);
7490 while Present
(Item
) loop
7491 if Nkind
(Item
) = N_Pragma
7492 and then Get_Pragma_Id
(Pragma_Name_Unmapped
(Item
)) = Id
7493 and then Class_Present
(Item
)
7498 Item
:= Next_Pragma
(Item
);
7502 end Get_Class_Wide_Pragma
;
7508 function Get_Full_View
(T
: Entity_Id
) return Entity_Id
is
7510 if Is_Incomplete_Type
(T
) and then Present
(Full_View
(T
)) then
7511 return Full_View
(T
);
7513 elsif Is_Class_Wide_Type
(T
)
7514 and then Is_Incomplete_Type
(Root_Type
(T
))
7515 and then Present
(Full_View
(Root_Type
(T
)))
7517 return Class_Wide_Type
(Full_View
(Root_Type
(T
)));
7528 function Get_Pragma
(E
: Entity_Id
; Id
: Pragma_Id
) return Node_Id
is
7530 -- Classification pragmas
7532 Is_CLS
: constant Boolean :=
7533 Id
= Pragma_Abstract_State
or else
7534 Id
= Pragma_Attach_Handler
or else
7535 Id
= Pragma_Async_Readers
or else
7536 Id
= Pragma_Async_Writers
or else
7537 Id
= Pragma_Constant_After_Elaboration
or else
7538 Id
= Pragma_Depends
or else
7539 Id
= Pragma_Effective_Reads
or else
7540 Id
= Pragma_Effective_Writes
or else
7541 Id
= Pragma_Extensions_Visible
or else
7542 Id
= Pragma_Global
or else
7543 Id
= Pragma_Initial_Condition
or else
7544 Id
= Pragma_Initializes
or else
7545 Id
= Pragma_Interrupt_Handler
or else
7546 Id
= Pragma_Part_Of
or else
7547 Id
= Pragma_Refined_Depends
or else
7548 Id
= Pragma_Refined_Global
or else
7549 Id
= Pragma_Refined_State
or else
7550 Id
= Pragma_Volatile_Function
;
7552 -- Contract / test case pragmas
7554 Is_CTC
: constant Boolean :=
7555 Id
= Pragma_Contract_Cases
or else
7556 Id
= Pragma_Test_Case
;
7558 -- Pre / postcondition pragmas
7560 Is_PPC
: constant Boolean :=
7561 Id
= Pragma_Precondition
or else
7562 Id
= Pragma_Postcondition
or else
7563 Id
= Pragma_Refined_Post
;
7565 In_Contract
: constant Boolean := Is_CLS
or Is_CTC
or Is_PPC
;
7571 -- Handle pragmas that appear in N_Contract nodes. Those have to be
7572 -- extracted from their specialized list.
7575 Items
:= Contract
(E
);
7581 Item
:= Classifications
(Items
);
7584 Item
:= Contract_Test_Cases
(Items
);
7587 Item
:= Pre_Post_Conditions
(Items
);
7593 Item
:= First_Rep_Item
(E
);
7596 while Present
(Item
) loop
7597 if Nkind
(Item
) = N_Pragma
7598 and then Get_Pragma_Id
(Pragma_Name_Unmapped
(Item
)) = Id
7602 -- All nodes in N_Contract are chained using Next_Pragma
7604 elsif In_Contract
then
7605 Item
:= Next_Pragma
(Item
);
7610 Next_Rep_Item
(Item
);
7617 --------------------------------------
7618 -- Get_Record_Representation_Clause --
7619 --------------------------------------
7621 function Get_Record_Representation_Clause
(E
: Entity_Id
) return Node_Id
is
7625 N
:= First_Rep_Item
(E
);
7626 while Present
(N
) loop
7627 if Nkind
(N
) = N_Record_Representation_Clause
then
7635 end Get_Record_Representation_Clause
;
7637 ------------------------
7638 -- Has_Attach_Handler --
7639 ------------------------
7641 function Has_Attach_Handler
(Id
: E
) return B
is
7645 pragma Assert
(Is_Protected_Type
(Id
));
7647 Ritem
:= First_Rep_Item
(Id
);
7648 while Present
(Ritem
) loop
7649 if Nkind
(Ritem
) = N_Pragma
7650 and then Pragma_Name
(Ritem
) = Name_Attach_Handler
7654 Next_Rep_Item
(Ritem
);
7659 end Has_Attach_Handler
;
7665 function Has_DIC
(Id
: E
) return B
is
7667 return Has_Own_DIC
(Id
) or else Has_Inherited_DIC
(Id
);
7674 function Has_Entries
(Id
: E
) return B
is
7678 pragma Assert
(Is_Concurrent_Type
(Id
));
7680 Ent
:= First_Entity
(Id
);
7681 while Present
(Ent
) loop
7682 if Is_Entry
(Ent
) then
7686 Ent
:= Next_Entity
(Ent
);
7692 ----------------------------
7693 -- Has_Foreign_Convention --
7694 ----------------------------
7696 function Has_Foreign_Convention
(Id
: E
) return B
is
7698 -- While regular Intrinsics such as the Standard operators fit in the
7699 -- "Ada" convention, those with an Interface_Name materialize GCC
7700 -- builtin imports for which Ada special treatments shouldn't apply.
7702 return Convention
(Id
) in Foreign_Convention
7703 or else (Convention
(Id
) = Convention_Intrinsic
7704 and then Present
(Interface_Name
(Id
)));
7705 end Has_Foreign_Convention
;
7707 ---------------------------
7708 -- Has_Interrupt_Handler --
7709 ---------------------------
7711 function Has_Interrupt_Handler
(Id
: E
) return B
is
7715 pragma Assert
(Is_Protected_Type
(Id
));
7717 Ritem
:= First_Rep_Item
(Id
);
7718 while Present
(Ritem
) loop
7719 if Nkind
(Ritem
) = N_Pragma
7720 and then Pragma_Name
(Ritem
) = Name_Interrupt_Handler
7724 Next_Rep_Item
(Ritem
);
7729 end Has_Interrupt_Handler
;
7731 --------------------
7732 -- Has_Invariants --
7733 --------------------
7735 function Has_Invariants
(Id
: E
) return B
is
7737 return Has_Own_Invariants
(Id
) or else Has_Inherited_Invariants
(Id
);
7740 --------------------------
7741 -- Has_Non_Limited_View --
7742 --------------------------
7744 function Has_Non_Limited_View
(Id
: E
) return B
is
7746 return (Ekind
(Id
) in Incomplete_Kind
7747 or else Ekind
(Id
) in Class_Wide_Kind
7748 or else Ekind
(Id
) = E_Abstract_State
)
7749 and then Present
(Non_Limited_View
(Id
));
7750 end Has_Non_Limited_View
;
7752 ---------------------------------
7753 -- Has_Non_Null_Abstract_State --
7754 ---------------------------------
7756 function Has_Non_Null_Abstract_State
(Id
: E
) return B
is
7758 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
7761 Present
(Abstract_States
(Id
))
7763 not Is_Null_State
(Node
(First_Elmt
(Abstract_States
(Id
))));
7764 end Has_Non_Null_Abstract_State
;
7766 -------------------------------------
7767 -- Has_Non_Null_Visible_Refinement --
7768 -------------------------------------
7770 function Has_Non_Null_Visible_Refinement
(Id
: E
) return B
is
7771 Constits
: Elist_Id
;
7774 -- "Refinement" is a concept applicable only to abstract states
7776 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
7777 Constits
:= Refinement_Constituents
(Id
);
7779 -- A partial refinement is always non-null. For a full refinement to be
7780 -- non-null, the first constituent must be anything other than null.
7783 Has_Partial_Visible_Refinement
(Id
)
7784 or else (Has_Visible_Refinement
(Id
)
7785 and then Present
(Constits
)
7786 and then Nkind
(Node
(First_Elmt
(Constits
))) /= N_Null
);
7787 end Has_Non_Null_Visible_Refinement
;
7789 -----------------------------
7790 -- Has_Null_Abstract_State --
7791 -----------------------------
7793 function Has_Null_Abstract_State
(Id
: E
) return B
is
7794 pragma Assert
(Ekind_In
(Id
, E_Generic_Package
, E_Package
));
7796 States
: constant Elist_Id
:= Abstract_States
(Id
);
7799 -- Check first available state of related package. A null abstract
7800 -- state always appears as the sole element of the state list.
7804 and then Is_Null_State
(Node
(First_Elmt
(States
)));
7805 end Has_Null_Abstract_State
;
7807 ---------------------------------
7808 -- Has_Null_Visible_Refinement --
7809 ---------------------------------
7811 function Has_Null_Visible_Refinement
(Id
: E
) return B
is
7812 Constits
: Elist_Id
;
7815 -- "Refinement" is a concept applicable only to abstract states
7817 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
7818 Constits
:= Refinement_Constituents
(Id
);
7820 -- For a refinement to be null, the state's sole constituent must be a
7824 Has_Visible_Refinement
(Id
)
7825 and then Present
(Constits
)
7826 and then Nkind
(Node
(First_Elmt
(Constits
))) = N_Null
;
7827 end Has_Null_Visible_Refinement
;
7829 --------------------
7830 -- Has_Unmodified --
7831 --------------------
7833 function Has_Unmodified
(E
: Entity_Id
) return Boolean is
7835 if Has_Pragma_Unmodified
(E
) then
7837 elsif Warnings_Off
(E
) then
7838 Set_Warnings_Off_Used_Unmodified
(E
);
7845 ---------------------
7846 -- Has_Unreferenced --
7847 ---------------------
7849 function Has_Unreferenced
(E
: Entity_Id
) return Boolean is
7851 if Has_Pragma_Unreferenced
(E
) then
7853 elsif Warnings_Off
(E
) then
7854 Set_Warnings_Off_Used_Unreferenced
(E
);
7859 end Has_Unreferenced
;
7861 ----------------------
7862 -- Has_Warnings_Off --
7863 ----------------------
7865 function Has_Warnings_Off
(E
: Entity_Id
) return Boolean is
7867 if Warnings_Off
(E
) then
7868 Set_Warnings_Off_Used
(E
);
7873 end Has_Warnings_Off
;
7875 ------------------------------
7876 -- Implementation_Base_Type --
7877 ------------------------------
7879 function Implementation_Base_Type
(Id
: E
) return E
is
7884 Bastyp
:= Base_Type
(Id
);
7886 if Is_Incomplete_Or_Private_Type
(Bastyp
) then
7887 Imptyp
:= Underlying_Type
(Bastyp
);
7889 -- If we have an implementation type, then just return it,
7890 -- otherwise we return the Base_Type anyway. This can only
7891 -- happen in error situations and should avoid some error bombs.
7893 if Present
(Imptyp
) then
7894 return Base_Type
(Imptyp
);
7902 end Implementation_Base_Type
;
7904 -------------------------
7905 -- Invariant_Procedure --
7906 -------------------------
7908 function Invariant_Procedure
(Id
: E
) return E
is
7909 Subp_Elmt
: Elmt_Id
;
7910 Subp_Id
: Entity_Id
;
7914 pragma Assert
(Is_Type
(Id
));
7916 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
7918 if Present
(Subps
) then
7919 Subp_Elmt
:= First_Elmt
(Subps
);
7920 while Present
(Subp_Elmt
) loop
7921 Subp_Id
:= Node
(Subp_Elmt
);
7923 if Is_Invariant_Procedure
(Subp_Id
) then
7927 Next_Elmt
(Subp_Elmt
);
7932 end Invariant_Procedure
;
7934 ----------------------
7935 -- Is_Atomic_Or_VFA --
7936 ----------------------
7938 function Is_Atomic_Or_VFA
(Id
: E
) return B
is
7940 return Is_Atomic
(Id
) or else Is_Volatile_Full_Access
(Id
);
7941 end Is_Atomic_Or_VFA
;
7947 -- Global flag table allowing rapid computation of this function
7949 Entity_Is_Base_Type
: constant array (Entity_Kind
) of Boolean :=
7950 (E_Enumeration_Subtype |
7951 E_Incomplete_Subtype |
7952 E_Signed_Integer_Subtype |
7953 E_Modular_Integer_Subtype |
7954 E_Floating_Point_Subtype |
7955 E_Ordinary_Fixed_Point_Subtype |
7956 E_Decimal_Fixed_Point_Subtype |
7960 E_Record_Subtype_With_Private |
7961 E_Limited_Private_Subtype |
7963 E_Protected_Subtype |
7965 E_String_Literal_Subtype |
7966 E_Class_Wide_Subtype
=> False,
7969 function Is_Base_Type
(Id
: E
) return Boolean is
7971 return Entity_Is_Base_Type
(Ekind
(Id
));
7974 ---------------------
7975 -- Is_Boolean_Type --
7976 ---------------------
7978 function Is_Boolean_Type
(Id
: E
) return B
is
7980 return Root_Type
(Id
) = Standard_Boolean
;
7981 end Is_Boolean_Type
;
7983 ------------------------
7984 -- Is_Constant_Object --
7985 ------------------------
7987 function Is_Constant_Object
(Id
: E
) return B
is
7988 K
: constant Entity_Kind
:= Ekind
(Id
);
7991 K
= E_Constant
or else K
= E_In_Parameter
or else K
= E_Loop_Parameter
;
7992 end Is_Constant_Object
;
7998 function Is_Controlled
(Id
: E
) return B
is
8000 return Is_Controlled_Active
(Id
) and then not Disable_Controlled
(Id
);
8003 --------------------
8004 -- Is_Discriminal --
8005 --------------------
8007 function Is_Discriminal
(Id
: E
) return B
is
8009 return (Ekind_In
(Id
, E_Constant
, E_In_Parameter
)
8010 and then Present
(Discriminal_Link
(Id
)));
8013 ----------------------
8014 -- Is_Dynamic_Scope --
8015 ----------------------
8017 function Is_Dynamic_Scope
(Id
: E
) return B
is
8020 Ekind
(Id
) = E_Block
8022 Ekind
(Id
) = E_Function
8024 Ekind
(Id
) = E_Procedure
8026 Ekind
(Id
) = E_Subprogram_Body
8028 Ekind
(Id
) = E_Task_Type
8030 (Ekind
(Id
) = E_Limited_Private_Type
8031 and then Present
(Full_View
(Id
))
8032 and then Ekind
(Full_View
(Id
)) = E_Task_Type
)
8034 Ekind
(Id
) = E_Entry
8036 Ekind
(Id
) = E_Entry_Family
8038 Ekind
(Id
) = E_Return_Statement
;
8039 end Is_Dynamic_Scope
;
8041 --------------------
8042 -- Is_Entity_Name --
8043 --------------------
8045 function Is_Entity_Name
(N
: Node_Id
) return Boolean is
8046 Kind
: constant Node_Kind
:= Nkind
(N
);
8049 -- Identifiers, operator symbols, expanded names are entity names
8051 return Kind
= N_Identifier
8052 or else Kind
= N_Operator_Symbol
8053 or else Kind
= N_Expanded_Name
8055 -- Attribute references are entity names if they refer to an entity.
8056 -- Note that we don't do this by testing for the presence of the
8057 -- Entity field in the N_Attribute_Reference node, since it may not
8058 -- have been set yet.
8060 or else (Kind
= N_Attribute_Reference
8061 and then Is_Entity_Attribute_Name
(Attribute_Name
(N
)));
8064 -----------------------
8065 -- Is_External_State --
8066 -----------------------
8068 function Is_External_State
(Id
: E
) return B
is
8071 Ekind
(Id
) = E_Abstract_State
and then Has_Option
(Id
, Name_External
);
8072 end Is_External_State
;
8078 function Is_Finalizer
(Id
: E
) return B
is
8080 return Ekind
(Id
) = E_Procedure
and then Chars
(Id
) = Name_uFinalizer
;
8087 function Is_Null_State
(Id
: E
) return B
is
8090 Ekind
(Id
) = E_Abstract_State
and then Nkind
(Parent
(Id
)) = N_Null
;
8093 ---------------------
8094 -- Is_Packed_Array --
8095 ---------------------
8097 function Is_Packed_Array
(Id
: E
) return B
is
8099 return Is_Array_Type
(Id
) and then Is_Packed
(Id
);
8100 end Is_Packed_Array
;
8102 -----------------------------------
8103 -- Is_Package_Or_Generic_Package --
8104 -----------------------------------
8106 function Is_Package_Or_Generic_Package
(Id
: E
) return B
is
8108 return Ekind_In
(Id
, E_Generic_Package
, E_Package
);
8109 end Is_Package_Or_Generic_Package
;
8115 function Is_Prival
(Id
: E
) return B
is
8117 return (Ekind_In
(Id
, E_Constant
, E_Variable
)
8118 and then Present
(Prival_Link
(Id
)));
8121 ----------------------------
8122 -- Is_Protected_Component --
8123 ----------------------------
8125 function Is_Protected_Component
(Id
: E
) return B
is
8127 return Ekind
(Id
) = E_Component
and then Is_Protected_Type
(Scope
(Id
));
8128 end Is_Protected_Component
;
8130 ----------------------------
8131 -- Is_Protected_Interface --
8132 ----------------------------
8134 function Is_Protected_Interface
(Id
: E
) return B
is
8135 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8137 if not Is_Interface
(Typ
) then
8139 elsif Is_Class_Wide_Type
(Typ
) then
8140 return Is_Protected_Interface
(Etype
(Typ
));
8142 return Protected_Present
(Type_Definition
(Parent
(Typ
)));
8144 end Is_Protected_Interface
;
8146 ------------------------------
8147 -- Is_Protected_Record_Type --
8148 ------------------------------
8150 function Is_Protected_Record_Type
(Id
: E
) return B
is
8153 Is_Concurrent_Record_Type
(Id
)
8154 and then Is_Protected_Type
(Corresponding_Concurrent_Type
(Id
));
8155 end Is_Protected_Record_Type
;
8157 --------------------------------
8158 -- Is_Standard_Character_Type --
8159 --------------------------------
8161 function Is_Standard_Character_Type
(Id
: E
) return B
is
8163 if Is_Type
(Id
) then
8165 R
: constant Entity_Id
:= Root_Type
(Id
);
8168 R
= Standard_Character
8170 R
= Standard_Wide_Character
8172 R
= Standard_Wide_Wide_Character
;
8178 end Is_Standard_Character_Type
;
8180 -----------------------------
8181 -- Is_Standard_String_Type --
8182 -----------------------------
8184 function Is_Standard_String_Type
(Id
: E
) return B
is
8186 if Is_Type
(Id
) then
8188 R
: constant Entity_Id
:= Root_Type
(Id
);
8193 R
= Standard_Wide_String
8195 R
= Standard_Wide_Wide_String
;
8201 end Is_Standard_String_Type
;
8203 --------------------
8204 -- Is_String_Type --
8205 --------------------
8207 function Is_String_Type
(Id
: E
) return B
is
8209 return Is_Array_Type
(Id
)
8210 and then Id
/= Any_Composite
8211 and then Number_Dimensions
(Id
) = 1
8212 and then Is_Character_Type
(Component_Type
(Id
));
8215 -------------------------------
8216 -- Is_Synchronized_Interface --
8217 -------------------------------
8219 function Is_Synchronized_Interface
(Id
: E
) return B
is
8220 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8223 if not Is_Interface
(Typ
) then
8226 elsif Is_Class_Wide_Type
(Typ
) then
8227 return Is_Synchronized_Interface
(Etype
(Typ
));
8230 return Protected_Present
(Type_Definition
(Parent
(Typ
)))
8231 or else Synchronized_Present
(Type_Definition
(Parent
(Typ
)))
8232 or else Task_Present
(Type_Definition
(Parent
(Typ
)));
8234 end Is_Synchronized_Interface
;
8236 ---------------------------
8237 -- Is_Synchronized_State --
8238 ---------------------------
8240 function Is_Synchronized_State
(Id
: E
) return B
is
8243 Ekind
(Id
) = E_Abstract_State
8244 and then Has_Option
(Id
, Name_Synchronous
);
8245 end Is_Synchronized_State
;
8247 -----------------------
8248 -- Is_Task_Interface --
8249 -----------------------
8251 function Is_Task_Interface
(Id
: E
) return B
is
8252 Typ
: constant Entity_Id
:= Base_Type
(Id
);
8254 if not Is_Interface
(Typ
) then
8256 elsif Is_Class_Wide_Type
(Typ
) then
8257 return Is_Task_Interface
(Etype
(Typ
));
8259 return Task_Present
(Type_Definition
(Parent
(Typ
)));
8261 end Is_Task_Interface
;
8263 -------------------------
8264 -- Is_Task_Record_Type --
8265 -------------------------
8267 function Is_Task_Record_Type
(Id
: E
) return B
is
8270 Is_Concurrent_Record_Type
(Id
)
8271 and then Is_Task_Type
(Corresponding_Concurrent_Type
(Id
));
8272 end Is_Task_Record_Type
;
8274 ------------------------
8275 -- Is_Wrapper_Package --
8276 ------------------------
8278 function Is_Wrapper_Package
(Id
: E
) return B
is
8280 return (Ekind
(Id
) = E_Package
and then Present
(Related_Instance
(Id
)));
8281 end Is_Wrapper_Package
;
8287 function Last_Formal
(Id
: E
) return E
is
8292 (Is_Overloadable
(Id
)
8293 or else Ekind_In
(Id
, E_Entry_Family
,
8295 E_Subprogram_Type
));
8297 if Ekind
(Id
) = E_Enumeration_Literal
then
8301 Formal
:= First_Formal
(Id
);
8303 if Present
(Formal
) then
8304 while Present
(Next_Formal
(Formal
)) loop
8305 Formal
:= Next_Formal
(Formal
);
8313 function Model_Emin_Value
(Id
: E
) return Uint
is
8315 return Machine_Emin_Value
(Id
);
8316 end Model_Emin_Value
;
8318 -------------------------
8319 -- Model_Epsilon_Value --
8320 -------------------------
8322 function Model_Epsilon_Value
(Id
: E
) return Ureal
is
8323 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
8325 return Radix
** (1 - Model_Mantissa_Value
(Id
));
8326 end Model_Epsilon_Value
;
8328 --------------------------
8329 -- Model_Mantissa_Value --
8330 --------------------------
8332 function Model_Mantissa_Value
(Id
: E
) return Uint
is
8334 return Machine_Mantissa_Value
(Id
);
8335 end Model_Mantissa_Value
;
8337 -----------------------
8338 -- Model_Small_Value --
8339 -----------------------
8341 function Model_Small_Value
(Id
: E
) return Ureal
is
8342 Radix
: constant Ureal
:= UR_From_Uint
(Machine_Radix_Value
(Id
));
8344 return Radix
** (Model_Emin_Value
(Id
) - 1);
8345 end Model_Small_Value
;
8347 ------------------------
8348 -- Machine_Emax_Value --
8349 ------------------------
8351 function Machine_Emax_Value
(Id
: E
) return Uint
is
8352 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
8355 case Float_Rep
(Id
) is
8358 when 1 .. 6 => return Uint_128
;
8359 when 7 .. 15 => return 2**10;
8360 when 16 .. 33 => return 2**14;
8361 when others => return No_Uint
;
8365 return Uint_2
** Uint_7
- Uint_1
;
8367 end Machine_Emax_Value
;
8369 ------------------------
8370 -- Machine_Emin_Value --
8371 ------------------------
8373 function Machine_Emin_Value
(Id
: E
) return Uint
is
8375 case Float_Rep
(Id
) is
8376 when IEEE_Binary
=> return Uint_3
- Machine_Emax_Value
(Id
);
8377 when AAMP
=> return -Machine_Emax_Value
(Id
);
8379 end Machine_Emin_Value
;
8381 ----------------------------
8382 -- Machine_Mantissa_Value --
8383 ----------------------------
8385 function Machine_Mantissa_Value
(Id
: E
) return Uint
is
8386 Digs
: constant Pos
:= UI_To_Int
(Digits_Value
(Base_Type
(Id
)));
8389 case Float_Rep
(Id
) is
8392 when 1 .. 6 => return Uint_24
;
8393 when 7 .. 15 => return UI_From_Int
(53);
8394 when 16 .. 18 => return Uint_64
;
8395 when 19 .. 33 => return UI_From_Int
(113);
8396 when others => return No_Uint
;
8401 when 1 .. 6 => return Uint_24
;
8402 when 7 .. 9 => return UI_From_Int
(40);
8403 when others => return No_Uint
;
8406 end Machine_Mantissa_Value
;
8408 -------------------------
8409 -- Machine_Radix_Value --
8410 -------------------------
8412 function Machine_Radix_Value
(Id
: E
) return U
is
8414 case Float_Rep
(Id
) is
8420 end Machine_Radix_Value
;
8422 --------------------
8423 -- Next_Component --
8424 --------------------
8426 function Next_Component
(Id
: E
) return E
is
8430 Comp_Id
:= Next_Entity
(Id
);
8431 while Present
(Comp_Id
) loop
8432 exit when Ekind
(Comp_Id
) = E_Component
;
8433 Comp_Id
:= Next_Entity
(Comp_Id
);
8439 ------------------------------------
8440 -- Next_Component_Or_Discriminant --
8441 ------------------------------------
8443 function Next_Component_Or_Discriminant
(Id
: E
) return E
is
8447 Comp_Id
:= Next_Entity
(Id
);
8448 while Present
(Comp_Id
) loop
8449 exit when Ekind_In
(Comp_Id
, E_Component
, E_Discriminant
);
8450 Comp_Id
:= Next_Entity
(Comp_Id
);
8454 end Next_Component_Or_Discriminant
;
8456 -----------------------
8457 -- Next_Discriminant --
8458 -----------------------
8460 -- This function actually implements both Next_Discriminant and
8461 -- Next_Stored_Discriminant by making sure that the Discriminant
8462 -- returned is of the same variety as Id.
8464 function Next_Discriminant
(Id
: E
) return E
is
8466 -- Derived Tagged types with private extensions look like this...
8468 -- E_Discriminant d1
8469 -- E_Discriminant d2
8471 -- E_Discriminant d1
8472 -- E_Discriminant d2
8475 -- so it is critical not to go past the leading discriminants
8480 pragma Assert
(Ekind
(Id
) = E_Discriminant
);
8483 D
:= Next_Entity
(D
);
8485 or else (Ekind
(D
) /= E_Discriminant
8486 and then not Is_Itype
(D
))
8491 exit when Ekind
(D
) = E_Discriminant
8492 and then (Is_Completely_Hidden
(D
) = Is_Completely_Hidden
(Id
));
8496 end Next_Discriminant
;
8502 function Next_Formal
(Id
: E
) return E
is
8506 -- Follow the chain of declared entities as long as the kind of the
8507 -- entity corresponds to a formal parameter. Skip internal entities
8508 -- that may have been created for implicit subtypes, in the process
8509 -- of analyzing default expressions.
8515 if No
(P
) or else Is_Formal
(P
) then
8517 elsif not Is_Internal
(P
) then
8523 -----------------------------
8524 -- Next_Formal_With_Extras --
8525 -----------------------------
8527 function Next_Formal_With_Extras
(Id
: E
) return E
is
8529 if Present
(Extra_Formal
(Id
)) then
8530 return Extra_Formal
(Id
);
8532 return Next_Formal
(Id
);
8534 end Next_Formal_With_Extras
;
8540 function Next_Index
(Id
: Node_Id
) return Node_Id
is
8549 function Next_Literal
(Id
: E
) return E
is
8551 pragma Assert
(Nkind
(Id
) in N_Entity
);
8555 ------------------------------
8556 -- Next_Stored_Discriminant --
8557 ------------------------------
8559 function Next_Stored_Discriminant
(Id
: E
) return E
is
8561 -- See comment in Next_Discriminant
8563 return Next_Discriminant
(Id
);
8564 end Next_Stored_Discriminant
;
8566 -----------------------
8567 -- Number_Dimensions --
8568 -----------------------
8570 function Number_Dimensions
(Id
: E
) return Pos
is
8575 if Ekind
(Id
) = E_String_Literal_Subtype
then
8580 T
:= First_Index
(Id
);
8581 while Present
(T
) loop
8588 end Number_Dimensions
;
8590 --------------------
8591 -- Number_Entries --
8592 --------------------
8594 function Number_Entries
(Id
: E
) return Nat
is
8599 pragma Assert
(Is_Concurrent_Type
(Id
));
8602 Ent
:= First_Entity
(Id
);
8603 while Present
(Ent
) loop
8604 if Is_Entry
(Ent
) then
8608 Ent
:= Next_Entity
(Ent
);
8614 --------------------
8615 -- Number_Formals --
8616 --------------------
8618 function Number_Formals
(Id
: E
) return Pos
is
8624 Formal
:= First_Formal
(Id
);
8625 while Present
(Formal
) loop
8627 Formal
:= Next_Formal
(Formal
);
8633 --------------------
8634 -- Parameter_Mode --
8635 --------------------
8637 function Parameter_Mode
(Id
: E
) return Formal_Kind
is
8642 ---------------------------------
8643 -- Partial_Invariant_Procedure --
8644 ---------------------------------
8646 function Partial_Invariant_Procedure
(Id
: E
) return E
is
8647 Subp_Elmt
: Elmt_Id
;
8648 Subp_Id
: Entity_Id
;
8652 pragma Assert
(Is_Type
(Id
));
8654 Subps
:= Subprograms_For_Type
(Base_Type
(Id
));
8656 if Present
(Subps
) then
8657 Subp_Elmt
:= First_Elmt
(Subps
);
8658 while Present
(Subp_Elmt
) loop
8659 Subp_Id
:= Node
(Subp_Elmt
);
8661 if Is_Partial_Invariant_Procedure
(Subp_Id
) then
8665 Next_Elmt
(Subp_Elmt
);
8670 end Partial_Invariant_Procedure
;
8672 -------------------------------------
8673 -- Partial_Refinement_Constituents --
8674 -------------------------------------
8676 function Partial_Refinement_Constituents
(Id
: E
) return L
is
8677 Constits
: Elist_Id
:= No_Elist
;
8679 procedure Add_Usable_Constituents
(Item
: E
);
8680 -- Add global item Item and/or its constituents to list Constits when
8681 -- they can be used in a global refinement within the current scope. The
8683 -- 1) If Item is an abstract state with full refinement visible, add
8684 -- its constituents.
8685 -- 2) If Item is an abstract state with only partial refinement
8686 -- visible, add both Item and its constituents.
8687 -- 3) If Item is an abstract state without a visible refinement, add
8689 -- 4) If Id is not an abstract state, add it.
8691 procedure Add_Usable_Constituents
(List
: Elist_Id
);
8692 -- Apply Add_Usable_Constituents to every constituent in List
8694 -----------------------------
8695 -- Add_Usable_Constituents --
8696 -----------------------------
8698 procedure Add_Usable_Constituents
(Item
: E
) is
8700 if Ekind
(Item
) = E_Abstract_State
then
8701 if Has_Visible_Refinement
(Item
) then
8702 Add_Usable_Constituents
(Refinement_Constituents
(Item
));
8704 elsif Has_Partial_Visible_Refinement
(Item
) then
8705 Append_New_Elmt
(Item
, Constits
);
8706 Add_Usable_Constituents
(Part_Of_Constituents
(Item
));
8709 Append_New_Elmt
(Item
, Constits
);
8713 Append_New_Elmt
(Item
, Constits
);
8715 end Add_Usable_Constituents
;
8717 procedure Add_Usable_Constituents
(List
: Elist_Id
) is
8718 Constit_Elmt
: Elmt_Id
;
8720 if Present
(List
) then
8721 Constit_Elmt
:= First_Elmt
(List
);
8722 while Present
(Constit_Elmt
) loop
8723 Add_Usable_Constituents
(Node
(Constit_Elmt
));
8724 Next_Elmt
(Constit_Elmt
);
8727 end Add_Usable_Constituents
;
8729 -- Start of processing for Partial_Refinement_Constituents
8732 -- "Refinement" is a concept applicable only to abstract states
8734 pragma Assert
(Ekind
(Id
) = E_Abstract_State
);
8736 if Has_Visible_Refinement
(Id
) then
8737 Constits
:= Refinement_Constituents
(Id
);
8739 -- A refinement may be partially visible when objects declared in the
8740 -- private part of a package are subject to a Part_Of indicator.
8742 elsif Has_Partial_Visible_Refinement
(Id
) then
8743 Add_Usable_Constituents
(Part_Of_Constituents
(Id
));
8745 -- Function should only be called when full or partial refinement is
8749 raise Program_Error
;
8753 end Partial_Refinement_Constituents
;
8755 ------------------------
8756 -- Predicate_Function --
8757 ------------------------
8759 function Predicate_Function
(Id
: E
) return E
is
8760 Subp_Elmt
: Elmt_Id
;
8761 Subp_Id
: Entity_Id
;
8766 pragma Assert
(Is_Type
(Id
));
8768 -- If type is private and has a completion, predicate may be defined on
8771 if Is_Private_Type
(Id
)
8773 (not Has_Predicates
(Id
) or else No
(Subprograms_For_Type
(Id
)))
8774 and then Present
(Full_View
(Id
))
8776 Typ
:= Full_View
(Id
);
8782 Subps
:= Subprograms_For_Type
(Typ
);
8784 if Present
(Subps
) then
8785 Subp_Elmt
:= First_Elmt
(Subps
);
8786 while Present
(Subp_Elmt
) loop
8787 Subp_Id
:= Node
(Subp_Elmt
);
8789 if Ekind
(Subp_Id
) = E_Function
8790 and then Is_Predicate_Function
(Subp_Id
)
8795 Next_Elmt
(Subp_Elmt
);
8800 end Predicate_Function
;
8802 --------------------------
8803 -- Predicate_Function_M --
8804 --------------------------
8806 function Predicate_Function_M
(Id
: E
) return E
is
8807 Subp_Elmt
: Elmt_Id
;
8808 Subp_Id
: Entity_Id
;
8813 pragma Assert
(Is_Type
(Id
));
8815 -- If type is private and has a completion, predicate may be defined on
8818 if Is_Private_Type
(Id
)
8820 (not Has_Predicates
(Id
) or else No
(Subprograms_For_Type
(Id
)))
8821 and then Present
(Full_View
(Id
))
8823 Typ
:= Full_View
(Id
);
8829 Subps
:= Subprograms_For_Type
(Typ
);
8831 if Present
(Subps
) then
8832 Subp_Elmt
:= First_Elmt
(Subps
);
8833 while Present
(Subp_Elmt
) loop
8834 Subp_Id
:= Node
(Subp_Elmt
);
8836 if Ekind
(Subp_Id
) = E_Function
8837 and then Is_Predicate_Function_M
(Subp_Id
)
8842 Next_Elmt
(Subp_Elmt
);
8847 end Predicate_Function_M
;
8849 -------------------------
8850 -- Present_In_Rep_Item --
8851 -------------------------
8853 function Present_In_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) return Boolean is
8857 Ritem
:= First_Rep_Item
(E
);
8859 while Present
(Ritem
) loop
8864 Next_Rep_Item
(Ritem
);
8868 end Present_In_Rep_Item
;
8870 --------------------------
8871 -- Primitive_Operations --
8872 --------------------------
8874 function Primitive_Operations
(Id
: E
) return L
is
8876 if Is_Concurrent_Type
(Id
) then
8877 if Present
(Corresponding_Record_Type
(Id
)) then
8878 return Direct_Primitive_Operations
8879 (Corresponding_Record_Type
(Id
));
8881 -- If expansion is disabled the corresponding record type is absent,
8882 -- but if the type has ancestors it may have primitive operations.
8884 elsif Is_Tagged_Type
(Id
) then
8885 return Direct_Primitive_Operations
(Id
);
8891 return Direct_Primitive_Operations
(Id
);
8893 end Primitive_Operations
;
8895 ---------------------
8896 -- Record_Rep_Item --
8897 ---------------------
8899 procedure Record_Rep_Item
(E
: Entity_Id
; N
: Node_Id
) is
8901 Set_Next_Rep_Item
(N
, First_Rep_Item
(E
));
8902 Set_First_Rep_Item
(E
, N
);
8903 end Record_Rep_Item
;
8909 function Root_Type
(Id
: E
) return E
is
8913 pragma Assert
(Nkind
(Id
) in N_Entity
);
8915 T
:= Base_Type
(Id
);
8917 if Ekind
(T
) = E_Class_Wide_Type
then
8929 -- Following test catches some error cases resulting from
8932 elsif No
(Etyp
) then
8933 Check_Error_Detected
;
8936 elsif Is_Private_Type
(T
) and then Etyp
= Full_View
(T
) then
8939 elsif Is_Private_Type
(Etyp
) and then Full_View
(Etyp
) = T
then
8945 -- Return if there is a circularity in the inheritance chain. This
8946 -- happens in some error situations and we do not want to get
8947 -- stuck in this loop.
8949 if T
= Base_Type
(Id
) then
8956 ---------------------
8957 -- Safe_Emax_Value --
8958 ---------------------
8960 function Safe_Emax_Value
(Id
: E
) return Uint
is
8962 return Machine_Emax_Value
(Id
);
8963 end Safe_Emax_Value
;
8965 ----------------------
8966 -- Safe_First_Value --
8967 ----------------------
8969 function Safe_First_Value
(Id
: E
) return Ureal
is
8971 return -Safe_Last_Value
(Id
);
8972 end Safe_First_Value
;
8974 ---------------------
8975 -- Safe_Last_Value --
8976 ---------------------
8978 function Safe_Last_Value
(Id
: E
) return Ureal
is
8979 Radix
: constant Uint
:= Machine_Radix_Value
(Id
);
8980 Mantissa
: constant Uint
:= Machine_Mantissa_Value
(Id
);
8981 Emax
: constant Uint
:= Safe_Emax_Value
(Id
);
8982 Significand
: constant Uint
:= Radix
** Mantissa
- 1;
8983 Exponent
: constant Uint
:= Emax
- Mantissa
;
8989 (Num
=> Significand
* 2 ** (Exponent
mod 4),
8990 Den
=> -Exponent
/ 4,
8995 (Num
=> Significand
,
8999 end Safe_Last_Value
;
9005 function Scope_Depth
(Id
: E
) return Uint
is
9010 while Is_Record_Type
(Scop
) loop
9011 Scop
:= Scope
(Scop
);
9014 return Scope_Depth_Value
(Scop
);
9017 ---------------------
9018 -- Scope_Depth_Set --
9019 ---------------------
9021 function Scope_Depth_Set
(Id
: E
) return B
is
9023 return not Is_Record_Type
(Id
)
9024 and then Field22
(Id
) /= Union_Id
(Empty
);
9025 end Scope_Depth_Set
;
9027 -----------------------------
9028 -- Set_Component_Alignment --
9029 -----------------------------
9031 -- Component Alignment is encoded using two flags, Flag128/129 as
9032 -- follows. Note that both flags False = Align_Default, so that the
9033 -- default initialization of flags to False initializes component
9034 -- alignment to the default value as required.
9036 -- Flag128 Flag129 Value
9037 -- ------- ------- -----
9038 -- False False Calign_Default
9039 -- False True Calign_Component_Size
9040 -- True False Calign_Component_Size_4
9041 -- True True Calign_Storage_Unit
9043 procedure Set_Component_Alignment
(Id
: E
; V
: C
) is
9045 pragma Assert
((Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
9046 and then Is_Base_Type
(Id
));
9049 when Calign_Default
=>
9050 Set_Flag128
(Id
, False);
9051 Set_Flag129
(Id
, False);
9053 when Calign_Component_Size
=>
9054 Set_Flag128
(Id
, False);
9055 Set_Flag129
(Id
, True);
9057 when Calign_Component_Size_4
=>
9058 Set_Flag128
(Id
, True);
9059 Set_Flag129
(Id
, False);
9061 when Calign_Storage_Unit
=>
9062 Set_Flag128
(Id
, True);
9063 Set_Flag129
(Id
, True);
9065 end Set_Component_Alignment
;
9067 -----------------------
9068 -- Set_DIC_Procedure --
9069 -----------------------
9071 procedure Set_DIC_Procedure
(Id
: E
; V
: E
) is
9072 Base_Typ
: Entity_Id
;
9073 Subp_Elmt
: Elmt_Id
;
9074 Subp_Id
: Entity_Id
;
9078 pragma Assert
(Is_Type
(Id
));
9080 Base_Typ
:= Base_Type
(Id
);
9081 Subps
:= Subprograms_For_Type
(Base_Typ
);
9084 Subps
:= New_Elmt_List
;
9085 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9088 Subp_Elmt
:= First_Elmt
(Subps
);
9089 Prepend_Elmt
(V
, Subps
);
9091 -- Check for a duplicate default initial condition procedure
9093 while Present
(Subp_Elmt
) loop
9094 Subp_Id
:= Node
(Subp_Elmt
);
9096 if Is_DIC_Procedure
(Subp_Id
) then
9097 raise Program_Error
;
9100 Next_Elmt
(Subp_Elmt
);
9102 end Set_DIC_Procedure
;
9104 -----------------------------
9105 -- Set_Invariant_Procedure --
9106 -----------------------------
9108 procedure Set_Invariant_Procedure
(Id
: E
; V
: E
) is
9109 Base_Typ
: Entity_Id
;
9110 Subp_Elmt
: Elmt_Id
;
9111 Subp_Id
: Entity_Id
;
9115 pragma Assert
(Is_Type
(Id
));
9117 Base_Typ
:= Base_Type
(Id
);
9118 Subps
:= Subprograms_For_Type
(Base_Typ
);
9121 Subps
:= New_Elmt_List
;
9122 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9125 Subp_Elmt
:= First_Elmt
(Subps
);
9126 Prepend_Elmt
(V
, Subps
);
9128 -- Check for a duplicate invariant procedure
9130 while Present
(Subp_Elmt
) loop
9131 Subp_Id
:= Node
(Subp_Elmt
);
9133 if Is_Invariant_Procedure
(Subp_Id
) then
9134 raise Program_Error
;
9137 Next_Elmt
(Subp_Elmt
);
9139 end Set_Invariant_Procedure
;
9141 -------------------------------------
9142 -- Set_Partial_Invariant_Procedure --
9143 -------------------------------------
9145 procedure Set_Partial_Invariant_Procedure
(Id
: E
; V
: E
) is
9146 Base_Typ
: Entity_Id
;
9147 Subp_Elmt
: Elmt_Id
;
9148 Subp_Id
: Entity_Id
;
9152 pragma Assert
(Is_Type
(Id
));
9154 Base_Typ
:= Base_Type
(Id
);
9155 Subps
:= Subprograms_For_Type
(Base_Typ
);
9158 Subps
:= New_Elmt_List
;
9159 Set_Subprograms_For_Type
(Base_Typ
, Subps
);
9162 Subp_Elmt
:= First_Elmt
(Subps
);
9163 Prepend_Elmt
(V
, Subps
);
9165 -- Check for a duplicate partial invariant procedure
9167 while Present
(Subp_Elmt
) loop
9168 Subp_Id
:= Node
(Subp_Elmt
);
9170 if Is_Partial_Invariant_Procedure
(Subp_Id
) then
9171 raise Program_Error
;
9174 Next_Elmt
(Subp_Elmt
);
9176 end Set_Partial_Invariant_Procedure
;
9178 ----------------------------
9179 -- Set_Predicate_Function --
9180 ----------------------------
9182 procedure Set_Predicate_Function
(Id
: E
; V
: E
) is
9183 Subp_Elmt
: Elmt_Id
;
9184 Subp_Id
: Entity_Id
;
9188 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
9190 Subps
:= Subprograms_For_Type
(Id
);
9193 Subps
:= New_Elmt_List
;
9194 Set_Subprograms_For_Type
(Id
, Subps
);
9197 Subp_Elmt
:= First_Elmt
(Subps
);
9198 Prepend_Elmt
(V
, Subps
);
9200 -- Check for a duplicate predication function
9202 while Present
(Subp_Elmt
) loop
9203 Subp_Id
:= Node
(Subp_Elmt
);
9205 if Ekind
(Subp_Id
) = E_Function
9206 and then Is_Predicate_Function
(Subp_Id
)
9208 raise Program_Error
;
9211 Next_Elmt
(Subp_Elmt
);
9213 end Set_Predicate_Function
;
9215 ------------------------------
9216 -- Set_Predicate_Function_M --
9217 ------------------------------
9219 procedure Set_Predicate_Function_M
(Id
: E
; V
: E
) is
9220 Subp_Elmt
: Elmt_Id
;
9221 Subp_Id
: Entity_Id
;
9225 pragma Assert
(Is_Type
(Id
) and then Has_Predicates
(Id
));
9227 Subps
:= Subprograms_For_Type
(Id
);
9230 Subps
:= New_Elmt_List
;
9231 Set_Subprograms_For_Type
(Id
, Subps
);
9234 Subp_Elmt
:= First_Elmt
(Subps
);
9235 Prepend_Elmt
(V
, Subps
);
9237 -- Check for a duplicate predication function
9239 while Present
(Subp_Elmt
) loop
9240 Subp_Id
:= Node
(Subp_Elmt
);
9242 if Ekind
(Subp_Id
) = E_Function
9243 and then Is_Predicate_Function_M
(Subp_Id
)
9245 raise Program_Error
;
9248 Next_Elmt
(Subp_Elmt
);
9250 end Set_Predicate_Function_M
;
9256 function Size_Clause
(Id
: E
) return N
is
9258 return Get_Attribute_Definition_Clause
(Id
, Attribute_Size
);
9261 ------------------------
9262 -- Stream_Size_Clause --
9263 ------------------------
9265 function Stream_Size_Clause
(Id
: E
) return N
is
9267 return Get_Attribute_Definition_Clause
(Id
, Attribute_Stream_Size
);
9268 end Stream_Size_Clause
;
9274 function Subtype_Kind
(K
: Entity_Kind
) return Entity_Kind
is
9280 Kind
:= E_Access_Subtype
;
9282 when E_Array_Subtype
9285 Kind
:= E_Array_Subtype
;
9287 when E_Class_Wide_Subtype
9290 Kind
:= E_Class_Wide_Subtype
;
9292 when E_Decimal_Fixed_Point_Subtype
9293 | E_Decimal_Fixed_Point_Type
9295 Kind
:= E_Decimal_Fixed_Point_Subtype
;
9297 when E_Ordinary_Fixed_Point_Subtype
9298 | E_Ordinary_Fixed_Point_Type
9300 Kind
:= E_Ordinary_Fixed_Point_Subtype
;
9302 when E_Private_Subtype
9305 Kind
:= E_Private_Subtype
;
9307 when E_Limited_Private_Subtype
9308 | E_Limited_Private_Type
9310 Kind
:= E_Limited_Private_Subtype
;
9312 when E_Record_Subtype_With_Private
9313 | E_Record_Type_With_Private
9315 Kind
:= E_Record_Subtype_With_Private
;
9317 when E_Record_Subtype
9320 Kind
:= E_Record_Subtype
;
9322 when Enumeration_Kind
=>
9323 Kind
:= E_Enumeration_Subtype
;
9325 when E_Incomplete_Type
=>
9326 Kind
:= E_Incomplete_Subtype
;
9329 Kind
:= E_Floating_Point_Subtype
;
9331 when Signed_Integer_Kind
=>
9332 Kind
:= E_Signed_Integer_Subtype
;
9334 when Modular_Integer_Kind
=>
9335 Kind
:= E_Modular_Integer_Subtype
;
9337 when Protected_Kind
=>
9338 Kind
:= E_Protected_Subtype
;
9341 Kind
:= E_Task_Subtype
;
9345 raise Program_Error
;
9351 ---------------------
9352 -- Type_High_Bound --
9353 ---------------------
9355 function Type_High_Bound
(Id
: E
) return Node_Id
is
9356 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
9358 if Nkind
(Rng
) = N_Subtype_Indication
then
9359 return High_Bound
(Range_Expression
(Constraint
(Rng
)));
9361 return High_Bound
(Rng
);
9363 end Type_High_Bound
;
9365 --------------------
9366 -- Type_Low_Bound --
9367 --------------------
9369 function Type_Low_Bound
(Id
: E
) return Node_Id
is
9370 Rng
: constant Node_Id
:= Scalar_Range
(Id
);
9372 if Nkind
(Rng
) = N_Subtype_Indication
then
9373 return Low_Bound
(Range_Expression
(Constraint
(Rng
)));
9375 return Low_Bound
(Rng
);
9379 ---------------------
9380 -- Underlying_Type --
9381 ---------------------
9383 function Underlying_Type
(Id
: E
) return E
is
9385 -- For record_with_private the underlying type is always the direct full
9386 -- view. Never try to take the full view of the parent it does not make
9389 if Ekind
(Id
) = E_Record_Type_With_Private
then
9390 return Full_View
(Id
);
9392 -- If we have a class-wide type that comes from the limited view then we
9393 -- return the Underlying_Type of its nonlimited view.
9395 elsif Ekind
(Id
) = E_Class_Wide_Type
9396 and then From_Limited_With
(Id
)
9397 and then Present
(Non_Limited_View
(Id
))
9399 return Underlying_Type
(Non_Limited_View
(Id
));
9401 elsif Ekind
(Id
) in Incomplete_Or_Private_Kind
then
9403 -- If we have an incomplete or private type with a full view, then we
9404 -- return the Underlying_Type of this full view.
9406 if Present
(Full_View
(Id
)) then
9407 if Id
= Full_View
(Id
) then
9409 -- Previous error in declaration
9414 return Underlying_Type
(Full_View
(Id
));
9417 -- If we have a private type with an underlying full view, then we
9418 -- return the Underlying_Type of this underlying full view.
9420 elsif Ekind
(Id
) in Private_Kind
9421 and then Present
(Underlying_Full_View
(Id
))
9423 return Underlying_Type
(Underlying_Full_View
(Id
));
9425 -- If we have an incomplete entity that comes from the limited view
9426 -- then we return the Underlying_Type of its nonlimited view.
9428 elsif From_Limited_With
(Id
)
9429 and then Present
(Non_Limited_View
(Id
))
9431 return Underlying_Type
(Non_Limited_View
(Id
));
9433 -- Otherwise check for the case where we have a derived type or
9434 -- subtype, and if so get the Underlying_Type of the parent type.
9436 elsif Etype
(Id
) /= Id
then
9437 return Underlying_Type
(Etype
(Id
));
9439 -- Otherwise we have an incomplete or private type that has no full
9440 -- view, which means that we have not encountered the completion, so
9441 -- return Empty to indicate the underlying type is not yet known.
9447 -- For non-incomplete, non-private types, return the type itself Also
9448 -- for entities that are not types at all return the entity itself.
9453 end Underlying_Type
;
9455 ------------------------
9456 -- Write_Entity_Flags --
9457 ------------------------
9459 procedure Write_Entity_Flags
(Id
: Entity_Id
; Prefix
: String) is
9461 procedure W
(Flag_Name
: String; Flag
: Boolean);
9462 -- Write out given flag if it is set
9468 procedure W
(Flag_Name
: String; Flag
: Boolean) is
9472 Write_Str
(Flag_Name
);
9473 Write_Str
(" = True");
9478 -- Start of processing for Write_Entity_Flags
9481 if (Is_Array_Type
(Id
) or else Is_Record_Type
(Id
))
9482 and then Is_Base_Type
(Id
)
9485 Write_Str
("Component_Alignment = ");
9487 case Component_Alignment
(Id
) is
9488 when Calign_Default
=>
9489 Write_Str
("Calign_Default");
9491 when Calign_Component_Size
=>
9492 Write_Str
("Calign_Component_Size");
9494 when Calign_Component_Size_4
=>
9495 Write_Str
("Calign_Component_Size_4");
9497 when Calign_Storage_Unit
=>
9498 Write_Str
("Calign_Storage_Unit");
9504 W
("Address_Taken", Flag104
(Id
));
9505 W
("Body_Needed_For_Inlining", Flag299
(Id
));
9506 W
("Body_Needed_For_SAL", Flag40
(Id
));
9507 W
("C_Pass_By_Copy", Flag125
(Id
));
9508 W
("Can_Never_Be_Null", Flag38
(Id
));
9509 W
("Checks_May_Be_Suppressed", Flag31
(Id
));
9510 W
("Contains_Ignored_Ghost_Code", Flag279
(Id
));
9511 W
("Debug_Info_Off", Flag166
(Id
));
9512 W
("Default_Expressions_Processed", Flag108
(Id
));
9513 W
("Delay_Cleanups", Flag114
(Id
));
9514 W
("Delay_Subprogram_Descriptors", Flag50
(Id
));
9515 W
("Depends_On_Private", Flag14
(Id
));
9516 W
("Discard_Names", Flag88
(Id
));
9517 W
("Elaboration_Entity_Required", Flag174
(Id
));
9518 W
("Elaborate_Body_Desirable", Flag210
(Id
));
9519 W
("Entry_Accepted", Flag152
(Id
));
9520 W
("Can_Use_Internal_Rep", Flag229
(Id
));
9521 W
("Finalize_Storage_Only", Flag158
(Id
));
9522 W
("From_Limited_With", Flag159
(Id
));
9523 W
("Has_Aliased_Components", Flag135
(Id
));
9524 W
("Has_Alignment_Clause", Flag46
(Id
));
9525 W
("Has_All_Calls_Remote", Flag79
(Id
));
9526 W
("Has_Atomic_Components", Flag86
(Id
));
9527 W
("Has_Biased_Representation", Flag139
(Id
));
9528 W
("Has_Completion", Flag26
(Id
));
9529 W
("Has_Completion_In_Body", Flag71
(Id
));
9530 W
("Has_Complex_Representation", Flag140
(Id
));
9531 W
("Has_Component_Size_Clause", Flag68
(Id
));
9532 W
("Has_Contiguous_Rep", Flag181
(Id
));
9533 W
("Has_Controlled_Component", Flag43
(Id
));
9534 W
("Has_Controlling_Result", Flag98
(Id
));
9535 W
("Has_Convention_Pragma", Flag119
(Id
));
9536 W
("Has_Default_Aspect", Flag39
(Id
));
9537 W
("Has_Delayed_Aspects", Flag200
(Id
));
9538 W
("Has_Delayed_Freeze", Flag18
(Id
));
9539 W
("Has_Delayed_Rep_Aspects", Flag261
(Id
));
9540 W
("Has_Discriminants", Flag5
(Id
));
9541 W
("Has_Dispatch_Table", Flag220
(Id
));
9542 W
("Has_Dynamic_Predicate_Aspect", Flag258
(Id
));
9543 W
("Has_Enumeration_Rep_Clause", Flag66
(Id
));
9544 W
("Has_Exit", Flag47
(Id
));
9545 W
("Has_Expanded_Contract", Flag240
(Id
));
9546 W
("Has_Forward_Instantiation", Flag175
(Id
));
9547 W
("Has_Fully_Qualified_Name", Flag173
(Id
));
9548 W
("Has_Gigi_Rep_Item", Flag82
(Id
));
9549 W
("Has_Homonym", Flag56
(Id
));
9550 W
("Has_Implicit_Dereference", Flag251
(Id
));
9551 W
("Has_Independent_Components", Flag34
(Id
));
9552 W
("Has_Inheritable_Invariants", Flag248
(Id
));
9553 W
("Has_Inherited_DIC", Flag133
(Id
));
9554 W
("Has_Inherited_Invariants", Flag291
(Id
));
9555 W
("Has_Initial_Value", Flag219
(Id
));
9556 W
("Has_Loop_Entry_Attributes", Flag260
(Id
));
9557 W
("Has_Machine_Radix_Clause", Flag83
(Id
));
9558 W
("Has_Master_Entity", Flag21
(Id
));
9559 W
("Has_Missing_Return", Flag142
(Id
));
9560 W
("Has_Nested_Block_With_Handler", Flag101
(Id
));
9561 W
("Has_Nested_Subprogram", Flag282
(Id
));
9562 W
("Has_Non_Standard_Rep", Flag75
(Id
));
9563 W
("Has_Out_Or_In_Out_Parameter", Flag110
(Id
));
9564 W
("Has_Object_Size_Clause", Flag172
(Id
));
9565 W
("Has_Own_DIC", Flag3
(Id
));
9566 W
("Has_Own_Invariants", Flag232
(Id
));
9567 W
("Has_Per_Object_Constraint", Flag154
(Id
));
9568 W
("Has_Pragma_Controlled", Flag27
(Id
));
9569 W
("Has_Pragma_Elaborate_Body", Flag150
(Id
));
9570 W
("Has_Pragma_Inline", Flag157
(Id
));
9571 W
("Has_Pragma_Inline_Always", Flag230
(Id
));
9572 W
("Has_Pragma_No_Inline", Flag201
(Id
));
9573 W
("Has_Pragma_Ordered", Flag198
(Id
));
9574 W
("Has_Pragma_Pack", Flag121
(Id
));
9575 W
("Has_Pragma_Preelab_Init", Flag221
(Id
));
9576 W
("Has_Pragma_Pure", Flag203
(Id
));
9577 W
("Has_Pragma_Pure_Function", Flag179
(Id
));
9578 W
("Has_Pragma_Thread_Local_Storage", Flag169
(Id
));
9579 W
("Has_Pragma_Unmodified", Flag233
(Id
));
9580 W
("Has_Pragma_Unreferenced", Flag180
(Id
));
9581 W
("Has_Pragma_Unreferenced_Objects", Flag212
(Id
));
9582 W
("Has_Pragma_Unused", Flag294
(Id
));
9583 W
("Has_Predicates", Flag250
(Id
));
9584 W
("Has_Primitive_Operations", Flag120
(Id
));
9585 W
("Has_Private_Ancestor", Flag151
(Id
));
9586 W
("Has_Private_Declaration", Flag155
(Id
));
9587 W
("Has_Private_Extension", Flag300
(Id
));
9588 W
("Has_Protected", Flag271
(Id
));
9589 W
("Has_Qualified_Name", Flag161
(Id
));
9590 W
("Has_RACW", Flag214
(Id
));
9591 W
("Has_Record_Rep_Clause", Flag65
(Id
));
9592 W
("Has_Recursive_Call", Flag143
(Id
));
9593 W
("Has_Shift_Operator", Flag267
(Id
));
9594 W
("Has_Size_Clause", Flag29
(Id
));
9595 W
("Has_Small_Clause", Flag67
(Id
));
9596 W
("Has_Specified_Layout", Flag100
(Id
));
9597 W
("Has_Specified_Stream_Input", Flag190
(Id
));
9598 W
("Has_Specified_Stream_Output", Flag191
(Id
));
9599 W
("Has_Specified_Stream_Read", Flag192
(Id
));
9600 W
("Has_Specified_Stream_Write", Flag193
(Id
));
9601 W
("Has_Static_Discriminants", Flag211
(Id
));
9602 W
("Has_Static_Predicate", Flag269
(Id
));
9603 W
("Has_Static_Predicate_Aspect", Flag259
(Id
));
9604 W
("Has_Storage_Size_Clause", Flag23
(Id
));
9605 W
("Has_Stream_Size_Clause", Flag184
(Id
));
9606 W
("Has_Task", Flag30
(Id
));
9607 W
("Has_Timing_Event", Flag289
(Id
));
9608 W
("Has_Thunks", Flag228
(Id
));
9609 W
("Has_Unchecked_Union", Flag123
(Id
));
9610 W
("Has_Unknown_Discriminants", Flag72
(Id
));
9611 W
("Has_Visible_Refinement", Flag263
(Id
));
9612 W
("Has_Volatile_Components", Flag87
(Id
));
9613 W
("Has_Xref_Entry", Flag182
(Id
));
9614 W
("Ignore_SPARK_Mode_Pragmas", Flag301
(Id
));
9615 W
("In_Package_Body", Flag48
(Id
));
9616 W
("In_Private_Part", Flag45
(Id
));
9617 W
("In_Use", Flag8
(Id
));
9618 W
("Is_Abstract_Subprogram", Flag19
(Id
));
9619 W
("Is_Abstract_Type", Flag146
(Id
));
9620 W
("Is_Access_Constant", Flag69
(Id
));
9621 W
("Is_Actual_Subtype", Flag293
(Id
));
9622 W
("Is_Ada_2005_Only", Flag185
(Id
));
9623 W
("Is_Ada_2012_Only", Flag199
(Id
));
9624 W
("Is_Aliased", Flag15
(Id
));
9625 W
("Is_Asynchronous", Flag81
(Id
));
9626 W
("Is_Atomic", Flag85
(Id
));
9627 W
("Is_Bit_Packed_Array", Flag122
(Id
));
9628 W
("Is_CPP_Class", Flag74
(Id
));
9629 W
("Is_Called", Flag102
(Id
));
9630 W
("Is_Character_Type", Flag63
(Id
));
9631 W
("Is_Checked_Ghost_Entity", Flag277
(Id
));
9632 W
("Is_Child_Unit", Flag73
(Id
));
9633 W
("Is_Class_Wide_Equivalent_Type", Flag35
(Id
));
9634 W
("Is_Compilation_Unit", Flag149
(Id
));
9635 W
("Is_Completely_Hidden", Flag103
(Id
));
9636 W
("Is_Concurrent_Record_Type", Flag20
(Id
));
9637 W
("Is_Constr_Subt_For_UN_Aliased", Flag141
(Id
));
9638 W
("Is_Constr_Subt_For_U_Nominal", Flag80
(Id
));
9639 W
("Is_Constrained", Flag12
(Id
));
9640 W
("Is_Constructor", Flag76
(Id
));
9641 W
("Is_Controlled_Active", Flag42
(Id
));
9642 W
("Is_Controlling_Formal", Flag97
(Id
));
9643 W
("Is_Descendant_Of_Address", Flag223
(Id
));
9644 W
("Is_DIC_Procedure", Flag132
(Id
));
9645 W
("Is_Discrim_SO_Function", Flag176
(Id
));
9646 W
("Is_Discriminant_Check_Function", Flag264
(Id
));
9647 W
("Is_Dispatch_Table_Entity", Flag234
(Id
));
9648 W
("Is_Dispatching_Operation", Flag6
(Id
));
9649 W
("Is_Elaboration_Checks_OK_Id", Flag148
(Id
));
9650 W
("Is_Eliminated", Flag124
(Id
));
9651 W
("Is_Entry_Formal", Flag52
(Id
));
9652 W
("Is_Exception_Handler", Flag286
(Id
));
9653 W
("Is_Exported", Flag99
(Id
));
9654 W
("Is_Finalized_Transient", Flag252
(Id
));
9655 W
("Is_First_Subtype", Flag70
(Id
));
9656 W
("Is_For_Access_Subtype", Flag118
(Id
));
9657 W
("Is_Formal_Subprogram", Flag111
(Id
));
9658 W
("Is_Frozen", Flag4
(Id
));
9659 W
("Is_Generic_Actual_Subprogram", Flag274
(Id
));
9660 W
("Is_Generic_Actual_Type", Flag94
(Id
));
9661 W
("Is_Generic_Instance", Flag130
(Id
));
9662 W
("Is_Generic_Type", Flag13
(Id
));
9663 W
("Is_Hidden", Flag57
(Id
));
9664 W
("Is_Hidden_Non_Overridden_Subpgm", Flag2
(Id
));
9665 W
("Is_Hidden_Open_Scope", Flag171
(Id
));
9666 W
("Is_Ignored_Ghost_Entity", Flag278
(Id
));
9667 W
("Is_Ignored_Transient", Flag295
(Id
));
9668 W
("Is_Immediately_Visible", Flag7
(Id
));
9669 W
("Is_Implementation_Defined", Flag254
(Id
));
9670 W
("Is_Imported", Flag24
(Id
));
9671 W
("Is_Independent", Flag268
(Id
));
9672 W
("Is_Initial_Condition_Procedure", Flag302
(Id
));
9673 W
("Is_Inlined", Flag11
(Id
));
9674 W
("Is_Inlined_Always", Flag1
(Id
));
9675 W
("Is_Instantiated", Flag126
(Id
));
9676 W
("Is_Interface", Flag186
(Id
));
9677 W
("Is_Internal", Flag17
(Id
));
9678 W
("Is_Interrupt_Handler", Flag89
(Id
));
9679 W
("Is_Intrinsic_Subprogram", Flag64
(Id
));
9680 W
("Is_Invariant_Procedure", Flag257
(Id
));
9681 W
("Is_Itype", Flag91
(Id
));
9682 W
("Is_Known_Non_Null", Flag37
(Id
));
9683 W
("Is_Known_Null", Flag204
(Id
));
9684 W
("Is_Known_Valid", Flag170
(Id
));
9685 W
("Is_Limited_Composite", Flag106
(Id
));
9686 W
("Is_Limited_Interface", Flag197
(Id
));
9687 W
("Is_Limited_Record", Flag25
(Id
));
9688 W
("Is_Local_Anonymous_Access", Flag194
(Id
));
9689 W
("Is_Machine_Code_Subprogram", Flag137
(Id
));
9690 W
("Is_Non_Static_Subtype", Flag109
(Id
));
9691 W
("Is_Null_Init_Proc", Flag178
(Id
));
9692 W
("Is_Obsolescent", Flag153
(Id
));
9693 W
("Is_Only_Out_Parameter", Flag226
(Id
));
9694 W
("Is_Package_Body_Entity", Flag160
(Id
));
9695 W
("Is_Packed", Flag51
(Id
));
9696 W
("Is_Packed_Array_Impl_Type", Flag138
(Id
));
9697 W
("Is_Param_Block_Component_Type", Flag215
(Id
));
9698 W
("Is_Partial_Invariant_Procedure", Flag292
(Id
));
9699 W
("Is_Potentially_Use_Visible", Flag9
(Id
));
9700 W
("Is_Predicate_Function", Flag255
(Id
));
9701 W
("Is_Predicate_Function_M", Flag256
(Id
));
9702 W
("Is_Preelaborated", Flag59
(Id
));
9703 W
("Is_Primitive", Flag218
(Id
));
9704 W
("Is_Primitive_Wrapper", Flag195
(Id
));
9705 W
("Is_Private_Composite", Flag107
(Id
));
9706 W
("Is_Private_Descendant", Flag53
(Id
));
9707 W
("Is_Private_Primitive", Flag245
(Id
));
9708 W
("Is_Public", Flag10
(Id
));
9709 W
("Is_Pure", Flag44
(Id
));
9710 W
("Is_Pure_Unit_Access_Type", Flag189
(Id
));
9711 W
("Is_RACW_Stub_Type", Flag244
(Id
));
9712 W
("Is_Raised", Flag224
(Id
));
9713 W
("Is_Remote_Call_Interface", Flag62
(Id
));
9714 W
("Is_Remote_Types", Flag61
(Id
));
9715 W
("Is_Renaming_Of_Object", Flag112
(Id
));
9716 W
("Is_Return_Object", Flag209
(Id
));
9717 W
("Is_Safe_To_Reevaluate", Flag249
(Id
));
9718 W
("Is_Shared_Passive", Flag60
(Id
));
9719 W
("Is_Static_Type", Flag281
(Id
));
9720 W
("Is_Statically_Allocated", Flag28
(Id
));
9721 W
("Is_Tag", Flag78
(Id
));
9722 W
("Is_Tagged_Type", Flag55
(Id
));
9723 W
("Is_Thunk", Flag225
(Id
));
9724 W
("Is_Trivial_Subprogram", Flag235
(Id
));
9725 W
("Is_True_Constant", Flag163
(Id
));
9726 W
("Is_Unchecked_Union", Flag117
(Id
));
9727 W
("Is_Underlying_Full_View", Flag298
(Id
));
9728 W
("Is_Underlying_Record_View", Flag246
(Id
));
9729 W
("Is_Unimplemented", Flag284
(Id
));
9730 W
("Is_Unsigned_Type", Flag144
(Id
));
9731 W
("Is_Uplevel_Referenced_Entity", Flag283
(Id
));
9732 W
("Is_Valued_Procedure", Flag127
(Id
));
9733 W
("Is_Visible_Formal", Flag206
(Id
));
9734 W
("Is_Visible_Lib_Unit", Flag116
(Id
));
9735 W
("Is_Volatile", Flag16
(Id
));
9736 W
("Is_Volatile_Full_Access", Flag285
(Id
));
9737 W
("Itype_Printed", Flag202
(Id
));
9738 W
("Kill_Elaboration_Checks", Flag32
(Id
));
9739 W
("Kill_Range_Checks", Flag33
(Id
));
9740 W
("Known_To_Have_Preelab_Init", Flag207
(Id
));
9741 W
("Low_Bound_Tested", Flag205
(Id
));
9742 W
("Machine_Radix_10", Flag84
(Id
));
9743 W
("Materialize_Entity", Flag168
(Id
));
9744 W
("May_Inherit_Delayed_Rep_Aspects", Flag262
(Id
));
9745 W
("Must_Be_On_Byte_Boundary", Flag183
(Id
));
9746 W
("Must_Have_Preelab_Init", Flag208
(Id
));
9747 W
("Needs_Debug_Info", Flag147
(Id
));
9748 W
("Needs_No_Actuals", Flag22
(Id
));
9749 W
("Never_Set_In_Source", Flag115
(Id
));
9750 W
("No_Dynamic_Predicate_On_actual", Flag276
(Id
));
9751 W
("No_Pool_Assigned", Flag131
(Id
));
9752 W
("No_Predicate_On_actual", Flag275
(Id
));
9753 W
("No_Reordering", Flag239
(Id
));
9754 W
("No_Return", Flag113
(Id
));
9755 W
("No_Strict_Aliasing", Flag136
(Id
));
9756 W
("Non_Binary_Modulus", Flag58
(Id
));
9757 W
("Nonzero_Is_True", Flag162
(Id
));
9758 W
("OK_To_Rename", Flag247
(Id
));
9759 W
("Optimize_Alignment_Space", Flag241
(Id
));
9760 W
("Optimize_Alignment_Time", Flag242
(Id
));
9761 W
("Overlays_Constant", Flag243
(Id
));
9762 W
("Partial_View_Has_Unknown_Discr", Flag280
(Id
));
9763 W
("Reachable", Flag49
(Id
));
9764 W
("Referenced", Flag156
(Id
));
9765 W
("Referenced_As_LHS", Flag36
(Id
));
9766 W
("Referenced_As_Out_Parameter", Flag227
(Id
));
9767 W
("Renamed_In_Spec", Flag231
(Id
));
9768 W
("Requires_Overriding", Flag213
(Id
));
9769 W
("Return_Present", Flag54
(Id
));
9770 W
("Returns_By_Ref", Flag90
(Id
));
9771 W
("Reverse_Bit_Order", Flag164
(Id
));
9772 W
("Reverse_Storage_Order", Flag93
(Id
));
9773 W
("Rewritten_For_C", Flag287
(Id
));
9774 W
("Predicates_Ignored", Flag288
(Id
));
9775 W
("Sec_Stack_Needed_For_Return", Flag167
(Id
));
9776 W
("Size_Depends_On_Discriminant", Flag177
(Id
));
9777 W
("Size_Known_At_Compile_Time", Flag92
(Id
));
9778 W
("SPARK_Aux_Pragma_Inherited", Flag266
(Id
));
9779 W
("SPARK_Pragma_Inherited", Flag265
(Id
));
9780 W
("SSO_Set_High_By_Default", Flag273
(Id
));
9781 W
("SSO_Set_Low_By_Default", Flag272
(Id
));
9782 W
("Static_Elaboration_Desired", Flag77
(Id
));
9783 W
("Stores_Attribute_Old_Prefix", Flag270
(Id
));
9784 W
("Strict_Alignment", Flag145
(Id
));
9785 W
("Suppress_Initialization", Flag105
(Id
));
9786 W
("Suppress_Style_Checks", Flag165
(Id
));
9787 W
("Suppress_Value_Tracking_On_Call", Flag217
(Id
));
9788 W
("Treat_As_Volatile", Flag41
(Id
));
9789 W
("Universal_Aliasing", Flag216
(Id
));
9790 W
("Used_As_Generic_Actual", Flag222
(Id
));
9791 W
("Uses_Sec_Stack", Flag95
(Id
));
9792 W
("Warnings_Off", Flag96
(Id
));
9793 W
("Warnings_Off_Used", Flag236
(Id
));
9794 W
("Warnings_Off_Used_Unmodified", Flag237
(Id
));
9795 W
("Warnings_Off_Used_Unreferenced", Flag238
(Id
));
9796 W
("Was_Hidden", Flag196
(Id
));
9797 end Write_Entity_Flags
;
9799 -----------------------
9800 -- Write_Entity_Info --
9801 -----------------------
9803 procedure Write_Entity_Info
(Id
: Entity_Id
; Prefix
: String) is
9805 procedure Write_Attribute
(Which
: String; Nam
: E
);
9806 -- Write attribute value with given string name
9808 procedure Write_Kind
(Id
: Entity_Id
);
9809 -- Write Ekind field of entity
9811 ---------------------
9812 -- Write_Attribute --
9813 ---------------------
9815 procedure Write_Attribute
(Which
: String; Nam
: E
) is
9819 Write_Int
(Int
(Nam
));
9821 Write_Name
(Chars
(Nam
));
9823 end Write_Attribute
;
9829 procedure Write_Kind
(Id
: Entity_Id
) is
9830 K
: constant String := Entity_Kind
'Image (Ekind
(Id
));
9834 Write_Str
(" Kind ");
9836 if Is_Type
(Id
) and then Is_Tagged_Type
(Id
) then
9837 Write_Str
("TAGGED ");
9840 Write_Str
(K
(3 .. K
'Length));
9843 if Is_Type
(Id
) and then Depends_On_Private
(Id
) then
9844 Write_Str
("Depends_On_Private ");
9848 -- Start of processing for Write_Entity_Info
9852 Write_Attribute
("Name ", Id
);
9853 Write_Int
(Int
(Id
));
9857 Write_Attribute
(" Type ", Etype
(Id
));
9859 Write_Attribute
(" Scope ", Scope
(Id
));
9863 when Discrete_Kind
=>
9864 Write_Str
("Bounds: Id = ");
9866 if Present
(Scalar_Range
(Id
)) then
9867 Write_Int
(Int
(Type_Low_Bound
(Id
)));
9868 Write_Str
(" .. Id = ");
9869 Write_Int
(Int
(Type_High_Bound
(Id
)));
9871 Write_Str
("Empty");
9882 (" Component Type ", Component_Type
(Id
));
9885 Write_Str
(" Indexes ");
9887 Index
:= First_Index
(Id
);
9888 while Present
(Index
) loop
9889 Write_Attribute
(" ", Etype
(Index
));
9890 Index
:= Next_Index
(Index
);
9898 (" Directly Designated Type ",
9899 Directly_Designated_Type
(Id
));
9902 when Overloadable_Kind
=>
9903 if Present
(Homonym
(Id
)) then
9904 Write_Str
(" Homonym ");
9905 Write_Name
(Chars
(Homonym
(Id
)));
9907 Write_Int
(Int
(Homonym
(Id
)));
9914 if Ekind
(Scope
(Id
)) in Record_Kind
then
9916 " Original_Record_Component ",
9917 Original_Record_Component
(Id
));
9918 Write_Int
(Int
(Original_Record_Component
(Id
)));
9925 end Write_Entity_Info
;
9927 -----------------------
9928 -- Write_Field6_Name --
9929 -----------------------
9931 procedure Write_Field6_Name
(Id
: Entity_Id
) is
9932 pragma Unreferenced
(Id
);
9934 Write_Str
("First_Rep_Item");
9935 end Write_Field6_Name
;
9937 -----------------------
9938 -- Write_Field7_Name --
9939 -----------------------
9941 procedure Write_Field7_Name
(Id
: Entity_Id
) is
9942 pragma Unreferenced
(Id
);
9944 Write_Str
("Freeze_Node");
9945 end Write_Field7_Name
;
9947 -----------------------
9948 -- Write_Field8_Name --
9949 -----------------------
9951 procedure Write_Field8_Name
(Id
: Entity_Id
) is
9955 Write_Str
("Associated_Node_For_Itype");
9958 Write_Str
("Dependent_Instances");
9961 Write_Str
("First_Exit_Statement");
9964 Write_Str
("Hiding_Loop_Variable");
9970 Write_Str
("Mechanism");
9975 Write_Str
("Normalized_First_Bit");
9977 when E_Abstract_State
=>
9978 Write_Str
("Refinement_Constituents");
9980 when E_Return_Statement
=>
9981 Write_Str
("Return_Applies_To");
9984 Write_Str
("Field8??");
9986 end Write_Field8_Name
;
9988 -----------------------
9989 -- Write_Field9_Name --
9990 -----------------------
9992 procedure Write_Field9_Name
(Id
: Entity_Id
) is
9996 Write_Str
("Class_Wide_Type");
9999 Write_Str
("Current_Value");
10002 | E_Generic_Function
10003 | E_Generic_Package
10004 | E_Generic_Procedure
10008 Write_Str
("Renaming_Map");
10011 Write_Str
("Field9??");
10013 end Write_Field9_Name
;
10015 ------------------------
10016 -- Write_Field10_Name --
10017 ------------------------
10019 procedure Write_Field10_Name
(Id
: Entity_Id
) is
10022 when Class_Wide_Kind
10029 Write_Str
("Direct_Primitive_Operations");
10034 Write_Str
("Discriminal_Link");
10037 Write_Str
("Float_Rep");
10044 Write_Str
("Handler_Records");
10049 Write_Str
("Normalized_Position_Max");
10051 when E_Abstract_State
10054 Write_Str
("Part_Of_Constituents");
10057 Write_Str
("Field10??");
10059 end Write_Field10_Name
;
10061 ------------------------
10062 -- Write_Field11_Name --
10063 ------------------------
10065 procedure Write_Field11_Name
(Id
: Entity_Id
) is
10069 Write_Str
("Block_Node");
10074 Write_Str
("Component_Bit_Offset");
10076 when Formal_Kind
=>
10077 Write_Str
("Entry_Component");
10079 when E_Enumeration_Literal
=>
10080 Write_Str
("Enumeration_Pos");
10085 Write_Str
("Full_View");
10087 when E_Generic_Package
=>
10088 Write_Str
("Generic_Homonym");
10091 Write_Str
("Part_Of_References");
10098 Write_Str
("Protected_Body_Subprogram");
10101 Write_Str
("Field11??");
10103 end Write_Field11_Name
;
10105 ------------------------
10106 -- Write_Field12_Name --
10107 ------------------------
10109 procedure Write_Field12_Name
(Id
: Entity_Id
) is
10113 Write_Str
("Associated_Formal_Package");
10116 Write_Str
("Barrier_Function");
10118 when E_Enumeration_Literal
=>
10119 Write_Str
("Enumeration_Rep");
10127 | E_In_Out_Parameter
10132 Write_Str
("Esize");
10137 Write_Str
("Next_Inlined_Subprogram");
10140 Write_Str
("Field12??");
10142 end Write_Field12_Name
;
10144 ------------------------
10145 -- Write_Field13_Name --
10146 ------------------------
10148 procedure Write_Field13_Name
(Id
: Entity_Id
) is
10154 Write_Str
("Component_Clause");
10159 | Generic_Unit_Kind
10161 Write_Str
("Elaboration_Entity");
10166 Write_Str
("Extra_Accessibility");
10169 Write_Str
("RM_Size");
10172 Write_Str
("Field13??");
10174 end Write_Field13_Name
;
10176 -----------------------
10177 -- Write_Field14_Name --
10178 -----------------------
10180 procedure Write_Field14_Name
(Id
: Entity_Id
) is
10190 Write_Str
("Alignment");
10195 Write_Str
("Normalized_Position");
10202 Write_Str
("Postconditions_Proc");
10204 when E_Generic_Package
10207 Write_Str
("Shadow_Entities");
10210 Write_Str
("Field14??");
10212 end Write_Field14_Name
;
10214 ------------------------
10215 -- Write_Field15_Name --
10216 ------------------------
10218 procedure Write_Field15_Name
(Id
: Entity_Id
) is
10221 when E_Discriminant
=>
10222 Write_Str
("Discriminant_Number");
10224 when E_Component
=>
10225 Write_Str
("DT_Entry_Count");
10230 Write_Str
("DT_Position");
10233 Write_Str
("Entry_Parameters_Type");
10235 when Formal_Kind
=>
10236 Write_Str
("Extra_Formal");
10239 Write_Str
("Pending_Access_Types");
10244 Write_Str
("Related_Instance");
10250 Write_Str
("Status_Flag_Or_Transient_Decl");
10253 Write_Str
("Field15??");
10255 end Write_Field15_Name
;
10257 ------------------------
10258 -- Write_Field16_Name --
10259 ------------------------
10261 procedure Write_Field16_Name
(Id
: Entity_Id
) is
10265 | E_Record_Type_With_Private
10267 Write_Str
("Access_Disp_Table");
10269 when E_Abstract_State
=>
10270 Write_Str
("Body_References");
10272 when E_Class_Wide_Subtype
10275 Write_Str
("Cloned_Subtype");
10280 Write_Str
("DTC_Entity");
10282 when E_Component
=>
10283 Write_Str
("Entry_Formal");
10285 when Concurrent_Kind
10286 | E_Generic_Package
10289 Write_Str
("First_Private_Entity");
10291 when Enumeration_Kind
=>
10292 Write_Str
("Lit_Strings");
10294 when Decimal_Fixed_Point_Kind
=>
10295 Write_Str
("Scale_Value");
10297 when E_String_Literal_Subtype
=>
10298 Write_Str
("String_Literal_Length");
10300 when E_Out_Parameter
10303 Write_Str
("Unset_Reference");
10306 Write_Str
("Field16??");
10308 end Write_Field16_Name
;
10310 ------------------------
10311 -- Write_Field17_Name --
10312 ------------------------
10314 procedure Write_Field17_Name
(Id
: Entity_Id
) is
10319 | E_Generic_In_Out_Parameter
10322 Write_Str
("Actual_Subtype");
10324 when Digits_Kind
=>
10325 Write_Str
("Digits_Value");
10327 when E_Discriminant
=>
10328 Write_Str
("Discriminal");
10330 when Class_Wide_Kind
10337 | E_Generic_Function
10338 | E_Generic_Package
10339 | E_Generic_Procedure
10347 | E_Return_Statement
10348 | E_Subprogram_Body
10349 | E_Subprogram_Type
10351 Write_Str
("First_Entity");
10354 Write_Str
("First_Index");
10356 when Enumeration_Kind
=>
10357 Write_Str
("First_Literal");
10359 when Access_Kind
=>
10360 Write_Str
("Master_Id");
10362 when Modular_Integer_Kind
=>
10363 Write_Str
("Modulus");
10365 when E_Component
=>
10366 Write_Str
("Prival");
10369 Write_Str
("Field17??");
10371 end Write_Field17_Name
;
10373 ------------------------
10374 -- Write_Field18_Name --
10375 ------------------------
10377 procedure Write_Field18_Name
(Id
: Entity_Id
) is
10380 when E_Enumeration_Literal
10385 Write_Str
("Alias");
10387 when E_Record_Type
=>
10388 Write_Str
("Corresponding_Concurrent_Type");
10390 when E_Subprogram_Body
=>
10391 Write_Str
("Corresponding_Protected_Entry");
10393 when Concurrent_Kind
=>
10394 Write_Str
("Corresponding_Record_Type");
10400 Write_Str
("Enclosing_Scope");
10402 when E_Entry_Index_Parameter
=>
10403 Write_Str
("Entry_Index_Constant");
10405 when E_Access_Protected_Subprogram_Type
10406 | E_Access_Subprogram_Type
10407 | E_Anonymous_Access_Protected_Subprogram_Type
10409 | E_Class_Wide_Subtype
10411 Write_Str
("Equivalent_Type");
10413 when Fixed_Point_Kind
=>
10414 Write_Str
("Delta_Value");
10416 when Enumeration_Kind
=>
10417 Write_Str
("Lit_Indexes");
10419 when Incomplete_Or_Private_Kind
10422 Write_Str
("Private_Dependents");
10425 | E_Generic_Function
10426 | E_Generic_Package
10427 | E_Generic_Procedure
10430 Write_Str
("Renamed_Entity");
10432 when Object_Kind
=>
10433 Write_Str
("Renamed_Object");
10435 when E_String_Literal_Subtype
=>
10436 Write_Str
("String_Literal_Low_Bound");
10439 Write_Str
("Field18??");
10441 end Write_Field18_Name
;
10443 -----------------------
10444 -- Write_Field19_Name --
10445 -----------------------
10447 procedure Write_Field19_Name
(Id
: Entity_Id
) is
10450 when E_Generic_Package
10453 Write_Str
("Body_Entity");
10455 when E_Discriminant
=>
10456 Write_Str
("Corresponding_Discriminant");
10458 when Scalar_Kind
=>
10459 Write_Str
("Default_Aspect_Value");
10461 when E_Array_Type
=>
10462 Write_Str
("Default_Component_Value");
10464 when E_Protected_Type
=>
10465 Write_Str
("Entry_Bodies_Array");
10469 | E_Subprogram_Type
10471 Write_Str
("Extra_Accessibility_Of_Result");
10473 when E_Abstract_State
10474 | E_Class_Wide_Type
10475 | E_Incomplete_Type
10477 Write_Str
("Non_Limited_View");
10479 when E_Incomplete_Subtype
=>
10480 if From_Limited_With
(Id
) then
10481 Write_Str
("Non_Limited_View");
10484 when E_Record_Type
=>
10485 Write_Str
("Parent_Subtype");
10487 when E_Procedure
=>
10488 Write_Str
("Receiving_Entry");
10493 Write_Str
("Size_Check_Code");
10498 Write_Str
("Spec_Entity");
10500 when Private_Kind
=>
10501 Write_Str
("Underlying_Full_View");
10504 Write_Str
("Field19??");
10506 end Write_Field19_Name
;
10508 -----------------------
10509 -- Write_Field20_Name --
10510 -----------------------
10512 procedure Write_Field20_Name
(Id
: Entity_Id
) is
10516 Write_Str
("Component_Type");
10518 when E_Generic_In_Parameter
10521 Write_Str
("Default_Value");
10523 when Access_Kind
=>
10524 Write_Str
("Directly_Designated_Type");
10526 when E_Component
=>
10527 Write_Str
("Discriminant_Checking_Func");
10529 when E_Discriminant
=>
10530 Write_Str
("Discriminant_Default_Value");
10532 when Class_Wide_Kind
10539 | E_Generic_Function
10540 | E_Generic_Package
10541 | E_Generic_Procedure
10549 | E_Return_Statement
10550 | E_Subprogram_Body
10551 | E_Subprogram_Type
10553 Write_Str
("Last_Entity");
10558 Write_Str
("Prival_Link");
10560 when E_Exception
=>
10561 Write_Str
("Register_Exception_Call");
10563 when Scalar_Kind
=>
10564 Write_Str
("Scalar_Range");
10567 Write_Str
("Field20??");
10569 end Write_Field20_Name
;
10571 -----------------------
10572 -- Write_Field21_Name --
10573 -----------------------
10575 procedure Write_Field21_Name
(Id
: Entity_Id
) is
10579 Write_Str
("Accept_Address");
10584 Write_Str
("Corresponding_Record_Component");
10586 when E_In_Parameter
=>
10587 Write_Str
("Default_Expr_Function");
10589 when Concurrent_Kind
10590 | Incomplete_Or_Private_Kind
10595 Write_Str
("Discriminant_Constraint");
10600 | E_Generic_Function
10601 | E_Generic_Procedure
10605 Write_Str
("Interface_Name");
10608 | Modular_Integer_Kind
10610 Write_Str
("Original_Array_Type");
10612 when Fixed_Point_Kind
=>
10613 Write_Str
("Small_Value");
10616 Write_Str
("Field21??");
10618 end Write_Field21_Name
;
10620 -----------------------
10621 -- Write_Field22_Name --
10622 -----------------------
10624 procedure Write_Field22_Name
(Id
: Entity_Id
) is
10627 when Access_Kind
=>
10628 Write_Str
("Associated_Storage_Pool");
10631 Write_Str
("Component_Size");
10633 when E_Record_Type
=>
10634 Write_Str
("Corresponding_Remote_Type");
10639 Write_Str
("Original_Record_Component");
10641 when E_Enumeration_Literal
=>
10642 Write_Str
("Enumeration_Rep_Expr");
10644 when E_Limited_Private_Subtype
10645 | E_Limited_Private_Type
10646 | E_Private_Subtype
10648 | E_Record_Subtype_With_Private
10649 | E_Record_Type_With_Private
10651 Write_Str
("Private_View");
10653 when Formal_Kind
=>
10654 Write_Str
("Protected_Formal");
10660 | E_Generic_Function
10661 | E_Generic_Package
10662 | E_Generic_Procedure
10668 | E_Return_Statement
10669 | E_Subprogram_Body
10672 Write_Str
("Scope_Depth_Value");
10675 Write_Str
("Shared_Var_Procs_Instance");
10678 Write_Str
("Field22??");
10680 end Write_Field22_Name
;
10682 ------------------------
10683 -- Write_Field23_Name --
10684 ------------------------
10686 procedure Write_Field23_Name
(Id
: Entity_Id
) is
10689 when E_Discriminant
=>
10690 Write_Str
("CR_Discriminant");
10693 Write_Str
("Entry_Cancel_Parameter");
10695 when E_Enumeration_Type
=>
10696 Write_Str
("Enum_Pos_To_Rep");
10701 Write_Str
("Extra_Constrained");
10703 when Access_Kind
=>
10704 Write_Str
("Finalization_Master");
10706 when E_Generic_Function
10707 | E_Generic_Package
10708 | E_Generic_Procedure
10710 Write_Str
("Inner_Instances");
10713 Write_Str
("Packed_Array_Impl_Type");
10716 Write_Str
("Protection_Object");
10718 when Class_Wide_Kind
10720 | Incomplete_Or_Private_Kind
10724 Write_Str
("Stored_Constraint");
10729 if Present
(Scope
(Id
))
10730 and then Is_Protected_Type
(Scope
(Id
))
10732 Write_Str
("Protection_Object");
10734 Write_Str
("Generic_Renamings");
10738 if Is_Generic_Instance
(Id
) then
10739 Write_Str
("Generic_Renamings");
10741 Write_Str
("Limited_View");
10745 Write_Str
("Field23??");
10747 end Write_Field23_Name
;
10749 ------------------------
10750 -- Write_Field24_Name --
10751 ------------------------
10753 procedure Write_Field24_Name
(Id
: Entity_Id
) is
10760 Write_Str
("Related_Expression");
10766 Write_Str
("Subps_Index");
10769 Write_Str
("Incomplete_Actuals");
10772 Write_Str
("Field24???");
10774 end Write_Field24_Name
;
10776 ------------------------
10777 -- Write_Field25_Name --
10778 ------------------------
10780 procedure Write_Field25_Name
(Id
: Entity_Id
) is
10783 when E_Generic_Package
10786 Write_Str
("Abstract_States");
10791 Write_Str
("Contract_Wrapper");
10794 Write_Str
("Debug_Renaming_Link");
10796 when E_Component
=>
10797 Write_Str
("DT_Offset_To_Top_Func");
10802 Write_Str
("Interface_Alias");
10804 when E_Record_Subtype
10805 | E_Record_Subtype_With_Private
10807 | E_Record_Type_With_Private
10809 Write_Str
("Interfaces");
10811 when E_Array_Subtype
10814 Write_Str
("Related_Array_Object");
10816 when Discrete_Kind
=>
10817 Write_Str
("Static_Discrete_Predicate");
10820 Write_Str
("Static_Real_Or_String_Predicate");
10823 Write_Str
("Task_Body_Procedure");
10826 Write_Str
("Field25??");
10828 end Write_Field25_Name
;
10830 ------------------------
10831 -- Write_Field26_Name --
10832 ------------------------
10834 procedure Write_Field26_Name
(Id
: Entity_Id
) is
10838 | E_Record_Type_With_Private
10840 Write_Str
("Dispatch_Table_Wrappers");
10842 when E_In_Out_Parameter
10846 Write_Str
("Last_Assignment");
10851 Write_Str
("Overridden_Operation");
10853 when E_Generic_Package
10856 Write_Str
("Package_Instantiation");
10861 Write_Str
("Related_Type");
10866 Write_Str
("Storage_Size_Variable");
10869 Write_Str
("Field26??");
10871 end Write_Field26_Name
;
10873 ------------------------
10874 -- Write_Field27_Name --
10875 ------------------------
10877 procedure Write_Field27_Name
(Id
: Entity_Id
) is
10883 Write_Str
("Current_Use_Clause");
10889 Write_Str
("Related_Type");
10894 Write_Str
("Wrapped_Entity");
10897 Write_Str
("Field27??");
10899 end Write_Field27_Name
;
10901 ------------------------
10902 -- Write_Field28_Name --
10903 ------------------------
10905 procedure Write_Field28_Name
(Id
: Entity_Id
) is
10912 | E_Subprogram_Body
10913 | E_Subprogram_Type
10915 Write_Str
("Extra_Formals");
10920 Write_Str
("Finalizer");
10925 Write_Str
("Initialization_Statements");
10927 when E_Access_Subprogram_Type
=>
10928 Write_Str
("Original_Access_Type");
10931 Write_Str
("Relative_Deadline_Variable");
10933 when E_Record_Type
=>
10934 Write_Str
("Underlying_Record_View");
10937 Write_Str
("Field28??");
10939 end Write_Field28_Name
;
10941 ------------------------
10942 -- Write_Field29_Name --
10943 ------------------------
10945 procedure Write_Field29_Name
(Id
: Entity_Id
) is
10951 | E_Subprogram_Body
10953 Write_Str
("Anonymous_Masters");
10958 Write_Str
("BIP_Initialization_Call");
10961 Write_Str
("Subprograms_For_Type");
10964 Write_Str
("Field29??");
10966 end Write_Field29_Name
;
10968 ------------------------
10969 -- Write_Field30_Name --
10970 ------------------------
10972 procedure Write_Field30_Name
(Id
: Entity_Id
) is
10976 | E_Record_Type_With_Private
10978 Write_Str
("Access_Disp_Table_Elab_Flag");
10980 when E_Protected_Type
10983 Write_Str
("Anonymous_Object");
10986 Write_Str
("Corresponding_Equality");
10991 Write_Str
("Last_Aggregate_Assignment");
10993 when E_Procedure
=>
10994 Write_Str
("Static_Initialization");
10997 Write_Str
("Field30??");
10999 end Write_Field30_Name
;
11001 ------------------------
11002 -- Write_Field31_Name --
11003 ------------------------
11005 procedure Write_Field31_Name
(Id
: Entity_Id
) is
11010 | E_In_Out_Parameter
11015 Write_Str
("Activation_Record_Component");
11018 Write_Str
("Derived_Type_Link");
11023 Write_Str
("Thunk_Entity");
11026 Write_Str
("Field31??");
11028 end Write_Field31_Name
;
11030 ------------------------
11031 -- Write_Field32_Name --
11032 ------------------------
11034 procedure Write_Field32_Name
(Id
: Entity_Id
) is
11037 when E_Procedure
=>
11038 Write_Str
("Corresponding_Function");
11041 Write_Str
("Corresponding_Procedure");
11043 when E_Abstract_State
11047 Write_Str
("Encapsulating_State");
11050 Write_Str
("No_Tagged_Streams_Pragma");
11053 Write_Str
("Field32??");
11055 end Write_Field32_Name
;
11057 ------------------------
11058 -- Write_Field33_Name --
11059 ------------------------
11061 procedure Write_Field33_Name
(Id
: Entity_Id
) is
11064 when Subprogram_Kind
11069 Write_Str
("Linker_Section_Pragma");
11072 Write_Str
("Field33??");
11074 end Write_Field33_Name
;
11076 ------------------------
11077 -- Write_Field34_Name --
11078 ------------------------
11080 procedure Write_Field34_Name
(Id
: Entity_Id
) is
11087 | E_Generic_Function
11088 | E_Generic_Package
11089 | E_Generic_Procedure
11095 | E_Subprogram_Body
11101 Write_Str
("Contract");
11104 Write_Str
("Field34??");
11106 end Write_Field34_Name
;
11108 ------------------------
11109 -- Write_Field35_Name --
11110 ------------------------
11112 procedure Write_Field35_Name
(Id
: Entity_Id
) is
11116 Write_Str
("Anonymous_Designated_Type");
11121 Write_Str
("Entry_Max_Queue_Lenghts_Array");
11123 when Subprogram_Kind
=>
11124 Write_Str
("Import_Pragma");
11127 Write_Str
("Field35??");
11129 end Write_Field35_Name
;
11131 ------------------------
11132 -- Write_Field36_Name --
11133 ------------------------
11135 procedure Write_Field36_Name
(Id
: Entity_Id
) is
11140 | E_Subprogram_Body
11142 Write_Str
("Nested_Scenarios");
11145 Write_Str
("Validated_Object");
11148 Write_Str
("Field36??");
11150 end Write_Field36_Name
;
11152 ------------------------
11153 -- Write_Field37_Name --
11154 ------------------------
11156 procedure Write_Field37_Name
(Id
: Entity_Id
) is
11157 pragma Unreferenced
(Id
);
11159 Write_Str
("Associated_Entity");
11160 end Write_Field37_Name
;
11162 ------------------------
11163 -- Write_Field38_Name --
11164 ------------------------
11166 procedure Write_Field38_Name
(Id
: Entity_Id
) is
11172 Write_Str
("class-wide clone");
11175 Write_Str
("Field38??");
11177 end Write_Field38_Name
;
11179 ------------------------
11180 -- Write_Field39_Name --
11181 ------------------------
11183 procedure Write_Field39_Name
(Id
: Entity_Id
) is
11189 Write_Str
("Protected_Subprogram");
11192 Write_Str
("Field39??");
11194 end Write_Field39_Name
;
11196 ------------------------
11197 -- Write_Field40_Name --
11198 ------------------------
11200 procedure Write_Field40_Name
(Id
: Entity_Id
) is
11207 | E_Generic_Function
11208 | E_Generic_Package
11209 | E_Generic_Procedure
11216 | E_Subprogram_Body
11222 Write_Str
("SPARK_Pragma");
11225 Write_Str
("Field40??");
11227 end Write_Field40_Name
;
11229 ------------------------
11230 -- Write_Field41_Name --
11231 ------------------------
11233 procedure Write_Field41_Name
(Id
: Entity_Id
) is
11239 Write_Str
("Original_Protected_Subprogram");
11241 when E_Generic_Package
11247 Write_Str
("SPARK_Aux_Pragma");
11250 Write_Str
("Field41??");
11252 end Write_Field41_Name
;
11254 -------------------------
11255 -- Iterator Procedures --
11256 -------------------------
11258 procedure Proc_Next_Component
(N
: in out Node_Id
) is
11260 N
:= Next_Component
(N
);
11261 end Proc_Next_Component
;
11263 procedure Proc_Next_Component_Or_Discriminant
(N
: in out Node_Id
) is
11265 N
:= Next_Entity
(N
);
11266 while Present
(N
) loop
11267 exit when Ekind_In
(N
, E_Component
, E_Discriminant
);
11268 N
:= Next_Entity
(N
);
11270 end Proc_Next_Component_Or_Discriminant
;
11272 procedure Proc_Next_Discriminant
(N
: in out Node_Id
) is
11274 N
:= Next_Discriminant
(N
);
11275 end Proc_Next_Discriminant
;
11277 procedure Proc_Next_Formal
(N
: in out Node_Id
) is
11279 N
:= Next_Formal
(N
);
11280 end Proc_Next_Formal
;
11282 procedure Proc_Next_Formal_With_Extras
(N
: in out Node_Id
) is
11284 N
:= Next_Formal_With_Extras
(N
);
11285 end Proc_Next_Formal_With_Extras
;
11287 procedure Proc_Next_Index
(N
: in out Node_Id
) is
11289 N
:= Next_Index
(N
);
11290 end Proc_Next_Index
;
11292 procedure Proc_Next_Inlined_Subprogram
(N
: in out Node_Id
) is
11294 N
:= Next_Inlined_Subprogram
(N
);
11295 end Proc_Next_Inlined_Subprogram
;
11297 procedure Proc_Next_Literal
(N
: in out Node_Id
) is
11299 N
:= Next_Literal
(N
);
11300 end Proc_Next_Literal
;
11302 procedure Proc_Next_Stored_Discriminant
(N
: in out Node_Id
) is
11304 N
:= Next_Stored_Discriminant
(N
);
11305 end Proc_Next_Stored_Discriminant
;