[Ada] Use new API when creating a special SPARK heap entity
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 12 Dec 2019 22:19:46 +0000 (23:19 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 2 Jun 2020 08:58:03 +0000 (04:58 -0400)
2020-06-02  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* lib-xref-spark_specific.adb (Create_Heap): use a new variant
of Name_Enter to directly converts String to Make_Id.

gcc/ada/lib-xref-spark_specific.adb

index 0ad704454f44d6dbfeef30948a84906213915131..460752d4c7e22660abcdcdb274843e70e62155e7 100644 (file)
@@ -291,10 +291,10 @@ package body SPARK_Specific is
 
       procedure Create_Heap is
       begin
-         Name_Len := Name_Of_Heap_Variable'Length;
-         Name_Buffer (1 .. Name_Len) := Name_Of_Heap_Variable;
-
-         Heap := Make_Defining_Identifier (Standard_Location, Name_Enter);
+         Heap :=
+           Make_Defining_Identifier
+             (Standard_Location,
+              Name_Enter (Name_Of_Heap_Variable));
 
          Set_Ekind       (Heap, E_Variable);
          Set_Is_Internal (Heap, True);