[COMMITTED] ada: Remove duplicated code in Proc_Next_Component_Or_Discriminant
Checks
Commit Message
From: Bob Duff <duff@adacore.com>
Proc_Next_Component_Or_Discriminant was duplicating the code
in Next_Component_Or_Discriminant.
gcc/ada/
* einfo-utils.adb:
(Proc_Next_Component_Or_Discriminant): Call
Next_Component_Or_Discriminant.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/einfo-utils.adb | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
@@ -3219,11 +3219,7 @@ package body Einfo.Utils is
procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id) is
begin
- N := Next_Entity (N);
- while Present (N) loop
- exit when Ekind (N) in E_Component | E_Discriminant;
- N := Next_Entity (N);
- end loop;
+ N := Next_Component_Or_Discriminant (N);
end Proc_Next_Component_Or_Discriminant;
procedure Proc_Next_Discriminant (N : in out Node_Id) is