summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rokos <grokos@us.ibm.com>2018-03-17 02:07:42 +0000
committerGeorge Rokos <grokos@us.ibm.com>2018-03-17 02:07:42 +0000
commit6b9bb5e1c25acef752b53d170b23759ac1e1d40f (patch)
tree587365c2ba2a7eee07a46b6cdc18b74afdf16988
parentec6327bab8afb25f746504e3c2afe0f0bcff7f49 (diff)
downloadbcm5719-llvm-6b9bb5e1c25acef752b53d170b23759ac1e1d40f.tar.gz
bcm5719-llvm-6b9bb5e1c25acef752b53d170b23759ac1e1d40f.zip
Bugfix, extern declarations for libomp functions are `extern "C"` declarations
llvm-svn: 327763
-rw-r--r--openmp/libomptarget/src/private.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/openmp/libomptarget/src/private.h b/openmp/libomptarget/src/private.h
index 8aa78d050d4..7bdadc01375 100644
--- a/openmp/libomptarget/src/private.h
+++ b/openmp/libomptarget/src/private.h
@@ -34,8 +34,14 @@ extern int target(int64_t device_id, void *host_ptr, int32_t arg_num,
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;
OpenPOWER on IntegriCloud