sem_prag.adb: (Analyze_Pragma...
authorEd Schonberg <schonberg@adacore.com>
Wed, 20 Aug 2008 14:27:21 +0000 (16:27 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 20 Aug 2008 14:27:21 +0000 (16:27 +0200)
2008-08-20  Ed Schonberg  <schonberg@adacore.com>

* sem_prag.adb:
(Analyze_Pragma, case Obsolescent): Add entity information on the pragma
argument for ASIS and navigation use.

From-SVN: r139301

gcc/ada/sem_prag.adb

index 44b5c88..d5d39b9 100644 (file)
@@ -9063,9 +9063,11 @@ package body Sem_Prag is
                if Present (Ename) then
 
                   --  If entity name matches, we are fine
+                  --  Save entity in pragma argument, for ASIS use.
 
                   if Chars (Ename) = Chars (Ent) then
-                     null;
+                     Set_Entity (Ename, Ent);
+                     Generate_Reference (Ent, Ename);
 
                   --  If entity name does not match, only possibility is an
                   --  enumeration literal from an enumeration type declaration.
@@ -9083,6 +9085,8 @@ package body Sem_Prag is
                               "enumeration literal");
 
                         elsif Chars (Ent) = Chars (Ename) then
+                           Set_Entity (Ename, Ent);
+                           Generate_Reference (Ent, Ename);
                            exit;
 
                         else