[Openmp-commits] [PATCH] D126001: [OpenMP][libomp] Fix fallthrough attribute detection for Intel compilers
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 19 11:04:47 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG28c8da29654d: [OpenMP][libomp] Fix fallthrough attribute detection for Intel compilers (authored by jlpeyton).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126001/new/
https://reviews.llvm.org/D126001
Files:
openmp/runtime/src/kmp_os.h
openmp/tools/archer/ompt-tsan.cpp
Index: openmp/tools/archer/ompt-tsan.cpp
===================================================================
--- openmp/tools/archer/ompt-tsan.cpp
+++ openmp/tools/archer/ompt-tsan.cpp
@@ -42,6 +42,9 @@
// Use a function like macro to imply that it must be followed by a semicolon
#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
#define KMP_FALLTHROUGH() [[fallthrough]]
+// icc cannot properly tell this attribute is absent so force off
+#elif defined(__INTEL_COMPILER)
+#define KMP_FALLTHROUGH() ((void)0)
#elif __has_cpp_attribute(clang::fallthrough)
#define KMP_FALLTHROUGH() [[clang::fallthrough]]
#elif __has_attribute(fallthrough) || __GNUC__ >= 7
Index: openmp/runtime/src/kmp_os.h
===================================================================
--- openmp/runtime/src/kmp_os.h
+++ openmp/runtime/src/kmp_os.h
@@ -345,6 +345,9 @@
// Use a function like macro to imply that it must be followed by a semicolon
#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
#define KMP_FALLTHROUGH() [[fallthrough]]
+// icc cannot properly tell this attribute is absent so force off
+#elif KMP_COMPILER_ICC
+#define KMP_FALLTHROUGH() ((void)0)
#elif __has_cpp_attribute(clang::fallthrough)
#define KMP_FALLTHROUGH() [[clang::fallthrough]]
#elif __has_attribute(fallthrough) || __GNUC__ >= 7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126001.445882.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220719/f696016a/attachment-0001.bin>
More information about the Openmp-commits
mailing list