[Ada] Simplify returning from Enclosing_Comp_Unit_Node
authorPiotr Trojanek <trojanek@adacore.com>
Tue, 11 May 2021 11:01:35 +0000 (13:01 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 6 Jul 2021 14:46:57 +0000 (14:46 +0000)
commitddbe7338f1ea50db4d39a925c6c530052ed288a4
tree67e67046e8608ff7214daf53b3e608e8835b5887
parentca290f108a62e041ea3ca7c981d8225f34cefdbd
[Ada] Simplify returning from Enclosing_Comp_Unit_Node

gcc/ada/

* sem_util.adb (Enclosing_Comp_Unit_Node): When the loop exits
the Current_Node is either an N_Compilation_Unit node or Empty,
so simply return it without redundant checks.
gcc/ada/sem_util.adb