]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Clean up copying of node trees
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 7 Mar 2023 20:00:46 +0000 (21:00 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 25 May 2023 07:44:18 +0000 (09:44 +0200)
Before calling routine In_Entity_Map we checked if the entity map is
present; inside this routine we checked this again.

Code cleanup; semantics is unaffected.

gcc/ada/

* sem_util.adb (Update_New_Entities): Remove redundant check for entity
map being present.

gcc/ada/sem_util.adb

index bfe1b9fc74d9fded77438c21b1aa33291328b0a5..8b536ec4e4281be0eca3f41796b4817e50ad1178 100644 (file)
@@ -23858,9 +23858,7 @@ package body Sem_Util is
             --  ??? Is there a better way of distinguishing those?
 
             while Present (Old_Id) and then Present (New_Id) loop
-               if not (Present (Entity_Map)
-                        and then In_Entity_Map (Old_Id, Entity_Map))
-               then
+               if not In_Entity_Map (Old_Id, Entity_Map) then
                   Update_Semantic_Fields (New_Id);
                end if;