[Openmp-commits] [openmp] a84b48d - [nfc][libomptarget] Remove casts of string literals to char*

via Openmp-commits openmp-commits at lists.llvm.org
Tue Nov 19 11:42:38 PST 2019


Author: JonChesterfield
Date: 2019-11-19T19:41:59Z
New Revision: a84b48d01e3e77b754a6d4d7326e4a0c4faa10ab

URL: https://github.com/llvm/llvm-project/commit/a84b48d01e3e77b754a6d4d7326e4a0c4faa10ab
DIFF: https://github.com/llvm/llvm-project/commit/a84b48d01e3e77b754a6d4d7326e4a0c4faa10ab.diff

LOG: [nfc][libomptarget] Remove casts of string literals to char*

Added: 
    

Modified: 
    openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
    openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
index 1a815ee4d240..a446e005c32f 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
@@ -52,17 +52,16 @@ class omptarget_nvptx_SharedArgs {
     // Free any memory allocated for outlined parallel function with a large
     // number of arguments.
     if (nArgs > MAX_SHARED_ARGS) {
-      SafeFree(args, (char *)"new extended args");
+      SafeFree(args, "new extended args");
       Init();
     }
   }
   INLINE void EnsureSize(size_t size) {
     if (size > nArgs) {
       if (nArgs > MAX_SHARED_ARGS) {
-        SafeFree(args, (char *)"new extended args");
+        SafeFree(args, "new extended args");
       }
-      args = (void **) SafeMalloc(size * sizeof(void *),
-                                  (char *)"new extended args");
+      args = (void **)SafeMalloc(size * sizeof(void *), "new extended args");
       nArgs = size;
     }
   }

diff  --git a/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu b/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
index dc0c22c4319e..aa0172778661 100644
--- a/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
+++ b/openmp/libomptarget/deviceRTLs/nvptx/src/parallel.cu
@@ -413,7 +413,7 @@ EXTERN void __kmpc_end_serialized_parallel(kmp_Ident *loc,
   omptarget_nvptx_threadPrivateContext->SetTopLevelTaskDescr(
       threadId, currTaskDescr->GetPrevTaskDescr());
   // free
-  SafeFree(currTaskDescr, (char *)"new seq parallel task");
+  SafeFree(currTaskDescr, "new seq parallel task");
   currTaskDescr = getMyTopTaskDescriptor(threadId);
   currTaskDescr->RestoreLoopData();
 }


        


More information about the Openmp-commits mailing list