[Ada] Simplify call to Unique_Defining_Entity on protected entry declarations
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 31 May 2018 10:46:34 +0000 (10:46 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 31 May 2018 10:46:34 +0000 (10:46 +0000)
Calling Unique_Defining_Entity on protectected entry declarations is
equivalent to calling a simpler Defining_Entity; use the simpler routine.

Simplification only; semantics unaffected, so no test provided.

2018-05-31  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
with a semantically equivalent call to Defining_Entity.

From-SVN: r261003

gcc/ada/ChangeLog
gcc/ada/sem_prag.adb

index a58cfe85b95ea056b5b5da363ed476bde114a2d2..8a138f0af8a838ce659d762857955b78b6650d6c 100644 (file)
@@ -1,3 +1,8 @@
+2018-05-31  Piotr Trojanek  <trojanek@adacore.com>
+
+       * sem_prag.adb (Analyze_Pragma): Replace call to Unique_Defining_Entity
+       with a semantically equivalent call to Defining_Entity.
+
 2018-05-31  Piotr Trojanek  <trojanek@adacore.com>
 
        * sem_prag.adb (Analyze_Pragma): Set Etype on the rewritten
index e80c297cd09efe51468405ce4c19a9f3c8487877..9cfb39c9ca2412db0f070c3bf6b6442a25b2ad44 100644 (file)
@@ -18795,7 +18795,7 @@ package body Sem_Prag is
                   return;
                end if;
 
-               Entry_Id := Unique_Defining_Entity (Entry_Decl);
+               Entry_Id := Defining_Entity (Entry_Decl);
 
             --  Otherwise the pragma is associated with an illegal construct