[OMPT] Workaround clang failing with 'declare target'

Current clang trunk reports _OPENMP to be 201307 = OpenMP 4.0. It doesn't
recognize '#pragma omp declare target' though (patch still pending) and
therefore fails compilation.

Differential Revision: http://reviews.llvm.org/D16631

llvm-svn: 259026
This commit is contained in:
Jonas Hahnfeld 2016-01-28 07:14:44 +00:00
parent 37e5d79c9c
commit bba248c368
3 changed files with 9 additions and 6 deletions

View File

@ -461,14 +461,15 @@ OMPT_API_FUNCTION(int, ompt_get_callback, (
***************************************************************************/
/* control */
#if defined(_OPENMP) && (_OPENMP >= 201307)
// FIXME: remove workaround for clang
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp declare target
#endif
void ompt_control(
uint64_t command,
uint64_t modifier
);
#if defined(_OPENMP) && (_OPENMP >= 201307)
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp end declare target
#endif

View File

@ -461,14 +461,15 @@ OMPT_API_FUNCTION(int, ompt_get_callback, (
***************************************************************************/
/* control */
#if defined(_OPENMP) && (_OPENMP >= 201307)
// FIXME: remove workaround for clang
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp declare target
#endif
void ompt_control(
uint64_t command,
uint64_t modifier
);
#if defined(_OPENMP) && (_OPENMP >= 201307)
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp end declare target
#endif

View File

@ -461,14 +461,15 @@ OMPT_API_FUNCTION(int, ompt_get_callback, (
***************************************************************************/
/* control */
#if defined(_OPENMP) && (_OPENMP >= 201307)
// FIXME: remove workaround for clang
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp declare target
#endif
void ompt_control(
uint64_t command,
uint64_t modifier
);
#if defined(_OPENMP) && (_OPENMP >= 201307)
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
#pragma omp end declare target
#endif