summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2015-06-11 17:36:16 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2015-06-11 17:36:16 +0000
commit9919dfc3b62cb5e51f32e3ac1e5fc8941e80dda1 (patch)
tree14b1ae51283840c4548689a557536918d778c5a3 /openmp/runtime/src
parent2d221406fa5967b663993f55ba7262f78fce061a (diff)
downloadbcm5719-llvm-9919dfc3b62cb5e51f32e3ac1e5fc8941e80dda1.tar.gz
bcm5719-llvm-9919dfc3b62cb5e51f32e3ac1e5fc8941e80dda1.zip
Remove unused variables '__kmp_build_check_*' for non assert builds.
Add new LIBOMP_ENABLE_ASSERTIONS macro which can be set in a standalone build or takes the value of LLVM_ENABLE_ASSERTIONS when inside llvm/projects. This change also defines the KMP_BUILD_ASSERT() macro to do nothing when ENABLE_ASSERTIONS is off. This means the __kmp_build_check_* types won't be defined and thus, no warnings. http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000719.html Patch by Jack Howarth and Jonathan Peyton llvm-svn: 239546
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/kmp_debug.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_debug.h b/openmp/runtime/src/kmp_debug.h
index 729677790e2..abc923edc64 100644
--- a/openmp/runtime/src/kmp_debug.h
+++ b/openmp/runtime/src/kmp_debug.h
@@ -42,7 +42,11 @@
#define __KMP_BUILD_ASSERT( expr, suffix ) typedef char __kmp_build_check_##suffix[ (expr) ? 1 : -1 ]
#define _KMP_BUILD_ASSERT( expr, suffix ) __KMP_BUILD_ASSERT( (expr), suffix )
-#define KMP_BUILD_ASSERT( expr ) _KMP_BUILD_ASSERT( (expr), __LINE__ )
+#ifdef KMP_USE_ASSERT
+ #define KMP_BUILD_ASSERT( expr ) _KMP_BUILD_ASSERT( (expr), __LINE__ )
+#else
+ #define KMP_BUILD_ASSERT( expr ) /* nothing to do */
+#endif
// -------------------------------------------------------------------------------------------------
// Run-time assertions.
OpenPOWER on IntegriCloud