This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Simplify call to Unique_Defining_Entity on protected entry declarations


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.

Tested on x86_64-pc-linux-gnu, committed on trunk

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.
--- gcc/ada/sem_prag.adb
+++ gcc/ada/sem_prag.adb
@@ -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
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]