[Openmp-commits] [openmp] r259026 - [OMPT] Workaround clang failing with 'declare target'
Jonas Hahnfeld via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 27 23:14:45 PST 2016
Author: hahnfeld
Date: Thu Jan 28 01:14:44 2016
New Revision: 259026
URL: http://llvm.org/viewvc/llvm-project?rev=259026&view=rev
Log:
[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
Modified:
openmp/trunk/runtime/src/include/30/ompt.h.var
openmp/trunk/runtime/src/include/40/ompt.h.var
openmp/trunk/runtime/src/include/41/ompt.h.var
Modified: openmp/trunk/runtime/src/include/30/ompt.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/30/ompt.h.var?rev=259026&r1=259025&r2=259026&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/30/ompt.h.var (original)
+++ openmp/trunk/runtime/src/include/30/ompt.h.var Thu Jan 28 01:14:44 2016
@@ -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
Modified: openmp/trunk/runtime/src/include/40/ompt.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/40/ompt.h.var?rev=259026&r1=259025&r2=259026&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/40/ompt.h.var (original)
+++ openmp/trunk/runtime/src/include/40/ompt.h.var Thu Jan 28 01:14:44 2016
@@ -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
Modified: openmp/trunk/runtime/src/include/41/ompt.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/41/ompt.h.var?rev=259026&r1=259025&r2=259026&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/41/ompt.h.var (original)
+++ openmp/trunk/runtime/src/include/41/ompt.h.var Thu Jan 28 01:14:44 2016
@@ -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
More information about the Openmp-commits
mailing list