[Openmp-commits] [openmp] r327763 - Bugfix, extern declarations for libomp functions are `extern "C"` declarations

George Rokos via Openmp-commits openmp-commits at lists.llvm.org
Fri Mar 16 19:07:42 PDT 2018


Author: grokos
Date: Fri Mar 16 19:07:42 2018
New Revision: 327763

URL: http://llvm.org/viewvc/llvm-project?rev=327763&view=rev
Log:
Bugfix, extern declarations for libomp functions are `extern "C"` declarations


Modified:
    openmp/trunk/libomptarget/src/private.h

Modified: openmp/trunk/libomptarget/src/private.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/libomptarget/src/private.h?rev=327763&r1=327762&r2=327763&view=diff
==============================================================================
--- openmp/trunk/libomptarget/src/private.h (original)
+++ openmp/trunk/libomptarget/src/private.h Fri Mar 16 19:07:42 2018
@@ -34,8 +34,14 @@ extern int target(int64_t device_id, voi
 extern int CheckDeviceAndCtors(int64_t device_id);
 
 // Implemented in libomp, they are called from within __tgt_* functions.
+#ifdef __cplusplus
+extern "C" {
+#endif
 int omp_get_default_device(void) __attribute__((weak));
 int32_t __kmpc_omp_taskwait(void *loc_ref, int32_t gtid) __attribute__((weak));
+#ifdef __cplusplus
+}
+#endif
 
 #ifdef OMPTARGET_DEBUG
 extern int DebugLevel;




More information about the Openmp-commits mailing list