From 6feab95cbcf0283b6bf4bf2e6e2e38370618930a Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Mon, 17 May 2021 23:06:56 +0200 Subject: [Ada] Simplify iteration over pending instantiations gcc/ada/ * inline.adb (Instantiate_Bodies): Fix white in declaration. (Remove_Dead_Instance): Change iteration from WHILE to FOR. --- gcc/ada/inline.adb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gcc') diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb index 589c0f3..6c330b2 100644 --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -4806,7 +4806,7 @@ package body Inline is end if; end Instantiate_Body; - J, K : Nat; + J, K : Nat; Info : Pending_Body_Info; -- Start of processing for Instantiate_Bodies @@ -5153,17 +5153,12 @@ package body Inline is -------------------------- procedure Remove_Dead_Instance (N : Node_Id) is - J : Int; - begin - J := 0; - while J <= Pending_Instantiations.Last loop + for J in 0 .. Pending_Instantiations.Last loop if Pending_Instantiations.Table (J).Inst_Node = N then Pending_Instantiations.Table (J).Inst_Node := Empty; return; end if; - - J := J + 1; end loop; end Remove_Dead_Instance; -- cgit v1.1