]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sem_util.adb (Set_Debug_Info_Needed): If the entity is a private type and the full...
authorEd Schonberg <schonberg@adacore.com>
Wed, 20 Aug 2008 14:28:08 +0000 (16:28 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 20 Aug 2008 14:28:08 +0000 (16:28 +0200)
2008-08-20  Ed Schonberg  <schonberg@adacore.com>

* sem_util.adb (Set_Debug_Info_Needed): If the entity is a private type
and the full view is visible, set flag on full view as well.

From-SVN: r139306

gcc/ada/sem_util.adb

index 5783d3c92e7738816e7a4db89bbb957d2c332971..7d8865c98883d5b8e89a5976a8e628ce6348bb9b 100644 (file)
@@ -8971,6 +8971,16 @@ package body Sem_Util is
            and then not Needs_Debug_Info (E)
          then
             Set_Debug_Info_Needed (E);
+
+            --  For a private type, indicate that the full view also needs
+            --  debug information.
+
+            if Is_Type (E)
+              and then Is_Private_Type (E)
+              and then Present (Full_View (E))
+            then
+               Set_Debug_Info_Needed (Full_View (E));
+            end if;
          end if;
       end Set_Debug_Info_Needed_If_Not_Set;