]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] CUDA: build procedure calls instead of function calls
authorRichard Kenner <kenner@adacore.com>
Thu, 23 Jul 2020 08:07:24 +0000 (10:07 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 20 Oct 2020 07:21:45 +0000 (03:21 -0400)
gcc/ada/

* gnat_cuda.adb (Build_Register_Function_Call): Make procedure
call instead of function, rename to
Build_Register_Procedure_Call.
(Build_CUDA_Init_Proc): Make procedure call instead of function.

gcc/ada/gnat_cuda.adb

index fef0d185918a7b06a936379e5fe111027baed7a7..39a55e64df879bc549307efe4d149d9f0e36296e 100644 (file)
@@ -223,7 +223,7 @@ package body GNAT_CUDA is
       --     Kernel : Interfaces.C.Strings.Chars_Ptr :=
       --       Interfaces.C.Strings.New_Char_Array("<Kernel's name>");
 
-      function Build_Register_Function_Call
+      function Build_Register_Procedure_Call
         (Loc         : Source_Ptr;
          Bin         : Entity_Id;
          Kernel      : Entity_Id;
@@ -272,7 +272,7 @@ package body GNAT_CUDA is
             Analyze (New_Stmt);
 
             Append_To (Stmts,
-              Build_Register_Function_Call (Loc,
+              Build_Register_Procedure_Call (Loc,
                 Bin         => Handle_Id,
                 Kernel      => Kernel_Id,
                 Kernel_Name => Defining_Entity (New_Stmt)));
@@ -285,7 +285,7 @@ package body GNAT_CUDA is
          --  won't be registering any other symbol with the current fat binary.
 
          Append_To (Stmts,
-           Make_Function_Call (Loc,
+           Make_Procedure_Call_Statement (Loc,
              Name                   =>
                New_Occurrence_Of (RTE (RE_Register_Fat_Binary_End), Loc),
              Parameter_Associations =>
@@ -440,11 +440,11 @@ package body GNAT_CUDA is
                    Make_String_Literal (Loc, Kernel_Name))));
       end Build_Kernel_Name_Declaration;
 
-      ----------------------------------
-      -- Build_Register_Function_Call --
-      ----------------------------------
+      -----------------------------------
+      -- Build_Register_Procedure_Call --
+      -----------------------------------
 
-      function Build_Register_Function_Call
+      function Build_Register_Procedure_Call
         (Loc         : Source_Ptr;
          Bin         : Entity_Id;
          Kernel      : Entity_Id;
@@ -487,11 +487,11 @@ package body GNAT_CUDA is
          --  list we just built.
 
          return
-           Make_Function_Call (Loc,
+           Make_Procedure_Call_Statement (Loc,
              Name                   =>
                New_Occurrence_Of (RTE (RE_Register_Function), Loc),
              Parameter_Associations => Args);
-      end Build_Register_Function_Call;
+      end Build_Register_Procedure_Call;
 
       --  Local declarations