]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ada/sem_disp.adb
[multiple changes]
[thirdparty/gcc.git] / gcc / ada / sem_disp.adb
index db266e874ada8f77f299c53150b3c3e55b6bea5b..e60574a14960192ac952b1dc74fe05ba7d958166 100644 (file)
@@ -1213,9 +1213,7 @@ package body Sem_Disp is
 
          Check_Subtype_Conformant (Subp, Ovr_Subp);
 
-         if (Chars (Subp) = Name_Initialize
-           or else Chars (Subp) = Name_Adjust
-           or else Chars (Subp) = Name_Finalize)
+         if Nam_In (Chars (Subp), Name_Initialize, Name_Adjust, Name_Finalize)
            and then Is_Controlled (Tagged_Type)
            and then not Is_Visibly_Controlled (Tagged_Type)
          then
@@ -1386,11 +1384,10 @@ package body Sem_Disp is
          Set_DT_Position (Subp, No_Uint);
 
       elsif Has_Controlled_Component (Tagged_Type)
-        and then
-          (Chars (Subp) = Name_Initialize or else
-           Chars (Subp) = Name_Adjust     or else
-           Chars (Subp) = Name_Finalize   or else
-           Chars (Subp) = Name_Finalize_Address)
+        and then Nam_In (Chars (Subp), Name_Initialize,
+                                       Name_Adjust,
+                                       Name_Finalize,
+                                       Name_Finalize_Address)
       then
          declare
             F_Node   : constant Node_Id := Freeze_Node (Tagged_Type);