aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_case.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_case.adb')
-rw-r--r--gcc/ada/sem_case.adb9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb
index 5433bb1..3a3e09f 100644
--- a/gcc/ada/sem_case.adb
+++ b/gcc/ada/sem_case.adb
@@ -41,7 +41,7 @@ with Sinfo; use Sinfo;
with Tbuild; use Tbuild;
with Uintp; use Uintp;
-with GNAT.Heap_Sort_A; use GNAT.Heap_Sort_A;
+with GNAT.Heap_Sort_G;
package body Sem_Case is
@@ -104,6 +104,8 @@ package body Sem_Case is
procedure Move_Choice (From : Natural; To : Natural);
-- Move routine for sorting the Choice_Table
+ package Sorting is new GNAT.Heap_Sort_G (Move_Choice, Lt_Choice);
+
procedure Issue_Msg (Value1 : Node_Id; Value2 : Node_Id);
procedure Issue_Msg (Value1 : Node_Id; Value2 : Uint);
procedure Issue_Msg (Value1 : Uint; Value2 : Node_Id);
@@ -215,10 +217,7 @@ package body Sem_Case is
return;
end if;
- Sort
- (Positive (Choice_Table'Last),
- Move_Choice'Unrestricted_Access,
- Lt_Choice'Unrestricted_Access);
+ Sorting.Sort (Positive (Choice_Table'Last));
Lo := Expr_Value (Choice_Table (1).Lo);
Hi := Expr_Value (Choice_Table (1).Hi);