summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_os.h
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2017-09-05 15:43:58 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2017-09-05 15:43:58 +0000
commit6a393f75f4ee7780d10f87a636bc7844f7157fca (patch)
treeb9bd6b4e798c20afddf78c741c3b4de94c548889 /openmp/runtime/src/kmp_os.h
parentab48e5e2448e1f5191071f9d9460646f676b2d1d (diff)
downloadbcm5719-llvm-6a393f75f4ee7780d10f87a636bc7844f7157fca.tar.gz
bcm5719-llvm-6a393f75f4ee7780d10f87a636bc7844f7157fca.zip
Minor code cleanup of Klocwork issues
Minor code cleanup of Klocwork issues. Fatal messages are given no return attribute. Define and use KMP_NORETURN to work for multiple C++ versions. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D37275 llvm-svn: 312538
Diffstat (limited to 'openmp/runtime/src/kmp_os.h')
-rw-r--r--openmp/runtime/src/kmp_os.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h
index b1af5109b91..2c70a72df11 100644
--- a/openmp/runtime/src/kmp_os.h
+++ b/openmp/runtime/src/kmp_os.h
@@ -294,6 +294,15 @@ extern "C" {
#define KMP_ALIGN(bytes) __declspec(align(bytes))
#endif
+// Define attribute that indicates a function does not return
+#if __cplusplus >= 201103L
+#define KMP_NORETURN [[noreturn]]
+#elif KMP_OS_WINDOWS
+#define KMP_NORETURN __declspec(noreturn)
+#else
+#define KMP_NORETURN __attribute__((noreturn))
+#endif
+
/* General purpose fence types for memory operations */
enum kmp_mem_fence_type {
kmp_no_fence, /* No memory fence */
OpenPOWER on IntegriCloud