[Openmp-commits] [openmp] r322869 - Sprinkle a few <cstdlib> includes, for libomptarget sources using

Dimitry Andric via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 18 10:24:22 PST 2018


Author: dim
Date: Thu Jan 18 10:24:22 2018
New Revision: 322869

URL: http://llvm.org/viewvc/llvm-project?rev=322869&view=rev
Log:
Sprinkle a few <cstdlib> includes, for libomptarget sources using
malloc, free, alloca and getenv.  NFCI.

Modified:
    openmp/trunk/libomptarget/src/api.cpp
    openmp/trunk/libomptarget/src/interface.cpp
    openmp/trunk/libomptarget/src/rtl.cpp

Modified: openmp/trunk/libomptarget/src/api.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/src/api.cpp?rev=322869&r1=322868&r2=322869&view=diff
==============================================================================
--- openmp/trunk/libomptarget/src/api.cpp (original)
+++ openmp/trunk/libomptarget/src/api.cpp Thu Jan 18 10:24:22 2018
@@ -19,6 +19,7 @@
 
 #include <climits>
 #include <cstring>
+#include <cstdlib>
 
 EXTERN int omp_get_num_devices(void) {
   RTLsMtx.lock();

Modified: openmp/trunk/libomptarget/src/interface.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/src/interface.cpp?rev=322869&r1=322868&r2=322869&view=diff
==============================================================================
--- openmp/trunk/libomptarget/src/interface.cpp (original)
+++ openmp/trunk/libomptarget/src/interface.cpp Thu Jan 18 10:24:22 2018
@@ -19,6 +19,7 @@
 #include "rtl.h"
 
 #include <cassert>
+#include <cstdlib>
 
 ////////////////////////////////////////////////////////////////////////////////
 /// adds a target shared library to the target execution image

Modified: openmp/trunk/libomptarget/src/rtl.cpp
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/src/rtl.cpp?rev=322869&r1=322868&r2=322869&view=diff
==============================================================================
--- openmp/trunk/libomptarget/src/rtl.cpp (original)
+++ openmp/trunk/libomptarget/src/rtl.cpp Thu Jan 18 10:24:22 2018
@@ -16,6 +16,7 @@
 #include "rtl.h"
 
 #include <cassert>
+#include <cstdlib>
 #include <cstring>
 #include <dlfcn.h>
 #include <mutex>




More information about the Openmp-commits mailing list