[Ada] Allow Known_Static_Component_Size (etc) on private types
authorBob Duff <duff@adacore.com>
Wed, 10 Feb 2021 13:47:16 +0000 (08:47 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 15 Jun 2021 10:19:27 +0000 (06:19 -0400)
gcc/ada/

* einfo-utils.adb (Known_Component_Size,
Known_Static_Component_Size, Unknown_Component_Size): Use
Implementation_Base_Type instead of Base_Type.

gcc/ada/einfo-utils.adb

index 0ed7c74f59e4af39f60f47dc593f2136137a8ce2..d71377743ca230288471e1256403d63ed05a2eda 100644 (file)
@@ -515,8 +515,8 @@ package body Einfo.Utils is
 
    function Known_Component_Size                  (E : Entity_Id) return B is
    begin
-      return Component_Size (Base_Type (E)) /= Uint_0
-        and then Component_Size (Base_Type (E)) /= No_Uint;
+      return Component_Size (Implementation_Base_Type (E)) /= Uint_0
+        and then Component_Size (Implementation_Base_Type (E)) /= No_Uint;
    end Known_Component_Size;
 
    function Known_Esize                           (E : Entity_Id) return B is
@@ -556,7 +556,7 @@ package body Einfo.Utils is
 
    function Known_Static_Component_Size           (E : Entity_Id) return B is
    begin
-      return Component_Size (Base_Type (E)) > Uint_0;
+      return Component_Size (Implementation_Base_Type (E)) > Uint_0;
    end Known_Static_Component_Size;
 
    function Known_Static_Esize                    (E : Entity_Id) return B is
@@ -604,9 +604,9 @@ package body Einfo.Utils is
 
    function Unknown_Component_Size                (E : Entity_Id) return B is
    begin
-      return Component_Size (Base_Type (E)) = Uint_0
+      return Component_Size (Implementation_Base_Type (E)) = Uint_0
                or else
-             Component_Size (Base_Type (E)) = No_Uint;
+             Component_Size (Implementation_Base_Type (E)) = No_Uint;
    end Unknown_Component_Size;
 
    function Unknown_Esize                         (E : Entity_Id) return B is