]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Small cleanup in processing of primitive operations
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 4 Jun 2024 19:33:28 +0000 (21:33 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 21 Jun 2024 08:34:20 +0000 (10:34 +0200)
commit7a51065e94e759d20dcb00cf58d4b472cc8185fd
tree3d4ffc2312b94a910abf4481d81a13e6109148e2
parent3c99b1a75585b3c5ea5f79c87702c33b60e47a14
ada: Small cleanup in processing of primitive operations

The processing of primitive operations is now always uniform for tagged and
untagged types, but the code contains left-overs from the time where it was
specific to tagged types, in particular for the handling of subtypes.

gcc/ada/

* einfo.ads (Direct_Primitive_Operations): Mention concurrent types
as well as GNAT extensions instead of implementation details.
(Primitive_Operations): Document that Direct_Primitive_Operations is
also used for concurrent types as a fallback.
* einfo-utils.adb (Primitive_Operations): Tweak formatting.
* exp_util.ads (Find_Prim_Op): Adjust description.
* exp_util.adb (Make_Subtype_From_Expr): In the private case with
unknown discriminants, always copy Direct_Primitive_Operations and
do not overwrite the Class_Wide_Type of the expression's base type.
* sem_ch3.adb (Analyze_Incomplete_Type_Decl): Tweak comment.
(Analyze_Subtype_Declaration): Remove older and now dead calls to
Set_Direct_Primitive_Operations.  Tweak comment.
(Build_Derived_Private_Type): Likewise.
(Build_Derived_Record_Type): Likewise.
(Build_Discriminated_Subtype): Set Direct_Primitive_Operations in
all cases instead of just for tagged types.
(Complete_Private_Subtype): Likewise.
(Derived_Type_Declaration): Tweak comment.
* sem_ch4.ads (Try_Object_Operation): Adjust description.
gcc/ada/einfo-utils.adb
gcc/ada/einfo.ads
gcc/ada/exp_util.adb
gcc/ada/exp_util.ads
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch4.ads