[Openmp-commits] [PATCH] D64625: [OpenMP] Move header inclusion out of 'extern "C"'
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 12 03:26:00 PDT 2019
Hahnfeld created this revision.
Hahnfeld added reviewers: AndreyChurbanov, jlpeyton, tlwilmar.
Herald added subscribers: openmp-commits, jdoerfert, guansong.
Herald added a project: OpenMP.
This leads to problems when compiling C++ code with libc++ for Nvidia GPUs
because Clang now uses wrappers for math functions that might include
C++ templates not allowed in 'extern "C"'.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64625
Files:
openmp/runtime/src/include/50/omp.h.var
Index: openmp/runtime/src/include/50/omp.h.var
===================================================================
--- openmp/runtime/src/include/50/omp.h.var
+++ openmp/runtime/src/include/50/omp.h.var
@@ -15,6 +15,9 @@
#ifndef __OMP_H
# define __OMP_H
+# include <stdlib.h>
+# include <stdint.h>
+
# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
@@ -134,8 +137,6 @@
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
-# include <stdlib.h>
-# include <stdint.h>
/* OpenMP 4.5 */
extern int __KAI_KMPC_CONVENTION omp_get_initial_device (void);
extern void* __KAI_KMPC_CONVENTION omp_target_alloc(size_t, int);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64625.209451.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20190712/bf824d77/attachment-0001.bin>
More information about the Openmp-commits
mailing list