Skip to content

Commit bba248c

Browse files
Jonas HahnfeldJonas Hahnfeld
Jonas Hahnfeld
authored and
Jonas Hahnfeld
committedJan 28, 2016
[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
1 parent 37e5d79 commit bba248c

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed
 

‎openmp/runtime/src/include/30/ompt.h.var

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,15 @@ OMPT_API_FUNCTION(int, ompt_get_callback, (
461461
***************************************************************************/
462462

463463
/* control */
464-
#if defined(_OPENMP) && (_OPENMP >= 201307)
464+
// FIXME: remove workaround for clang
465+
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
465466
#pragma omp declare target
466467
#endif
467468
void ompt_control(
468469
uint64_t command,
469470
uint64_t modifier
470471
);
471-
#if defined(_OPENMP) && (_OPENMP >= 201307)
472+
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
472473
#pragma omp end declare target
473474
#endif
474475

‎openmp/runtime/src/include/40/ompt.h.var

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,15 @@ OMPT_API_FUNCTION(int, ompt_get_callback, (
461461
***************************************************************************/
462462

463463
/* control */
464-
#if defined(_OPENMP) && (_OPENMP >= 201307)
464+
// FIXME: remove workaround for clang
465+
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
465466
#pragma omp declare target
466467
#endif
467468
void ompt_control(
468469
uint64_t command,
469470
uint64_t modifier
470471
);
471-
#if defined(_OPENMP) && (_OPENMP >= 201307)
472+
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
472473
#pragma omp end declare target
473474
#endif
474475

‎openmp/runtime/src/include/41/ompt.h.var

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,15 @@ OMPT_API_FUNCTION(int, ompt_get_callback, (
461461
***************************************************************************/
462462

463463
/* control */
464-
#if defined(_OPENMP) && (_OPENMP >= 201307)
464+
// FIXME: remove workaround for clang
465+
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
465466
#pragma omp declare target
466467
#endif
467468
void ompt_control(
468469
uint64_t command,
469470
uint64_t modifier
470471
);
471-
#if defined(_OPENMP) && (_OPENMP >= 201307)
472+
#if !defined(__clang__) && defined(_OPENMP) && (_OPENMP >= 201307)
472473
#pragma omp end declare target
473474
#endif
474475

0 commit comments

Comments
 (0)
Please sign in to comment.