]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove obsolete test
authorRonan Desplanques <desplanques@adacore.com>
Mon, 31 Mar 2025 13:17:26 +0000 (15:17 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 12 Jun 2025 08:37:54 +0000 (10:37 +0200)
A previous change cleaned up the Ekind field of record component
entities. That made a particular test obsolete, so this patch removes
that test.

gcc/ada/ChangeLog:

* einfo-utils.adb (Set_Convention): Remove obsolete test.

gcc/ada/einfo-utils.adb

index 15f5b9908481ef39251a0fe5dc3f6ff45adc3266..91d273cb32d9d2d25e6af0530f81458e7fe803c2 100644 (file)
@@ -2639,14 +2639,7 @@ package body Einfo.Utils is
       --  anonymous protected types, since protected types always have the
       --  default convention.
 
-      if Present (Etype (E))
-        and then (Is_Object (E)
-
-                   --  Allow E_Void (happens for pragma Convention appearing
-                   --  in the middle of a record applying to a component)
-
-                   or else Ekind (E) = E_Void)
-      then
+      if Present (Etype (E)) and then Is_Object (E) then
          declare
             Typ : constant Entity_Id := Etype (E);