Skip to content

Commit 1ff5535

Browse files
committed
[OpenMP] Move header inclusion out of 'extern "C"'
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"'. Differentiel Revision: https://reviews.llvm.org/D64625 llvm-svn: 366229
1 parent 97b4d7a commit 1ff5535

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openmp/runtime/src/include/omp.h.var

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
#ifndef __OMP_H
1616
# define __OMP_H
1717

18+
# include <stdlib.h>
19+
# include <stdint.h>
20+
1821
# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
1922
# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
2023
# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
@@ -134,8 +137,6 @@
134137
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
135138
extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
136139

137-
# include <stdlib.h>
138-
# include <stdint.h>
139140
/* OpenMP 4.5 */
140141
extern int __KAI_KMPC_CONVENTION omp_get_initial_device (void);
141142
extern void* __KAI_KMPC_CONVENTION omp_target_alloc(size_t, int);

0 commit comments

Comments
 (0)