summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-08-17 07:20:30 +0000
committerHans Wennborg <hans@hanshq.net>2018-08-17 07:20:30 +0000
commite07ae0015d3c3e3724b33f8498776f6fdb3ce377 (patch)
tree3c6e072ac46df73e1072fa84830a63c5beb12a58
parent267182af10dd5145fb0f25c83be618b77d7e319b (diff)
Merging r339741:
------------------------------------------------------------------------ r339741 | ldionne | 2018-08-15 02:16:41 +0200 (Wed, 15 Aug 2018) | 12 lines [libc++] Detect C11 features on non-Clang compilers Summary: The macros were inside `#if defined(_LIBCPP_COMPILER_CLANG)`, which means we would never detect C11 features on non-Clang compilers. According to Marshall Clow, this is not the intended behavior. Reviewers: mclow.lists, EricWF Subscribers: krytarowski, christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50748 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_70@339989 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/__config44
1 files changed, 22 insertions, 22 deletions
diff --git a/include/__config b/include/__config
index 98475c7f2..b6fc3acf9 100644
--- a/include/__config
+++ b/include/__config
@@ -328,6 +328,28 @@
# define _LIBCPP_NO_CFI
#endif
+#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
+# if defined(__FreeBSD__)
+# define _LIBCPP_HAS_QUICK_EXIT
+# define _LIBCPP_HAS_C11_FEATURES
+# elif defined(__Fuchsia__)
+# define _LIBCPP_HAS_QUICK_EXIT
+# define _LIBCPP_HAS_C11_FEATURES
+# elif defined(__linux__)
+# if !defined(_LIBCPP_HAS_MUSL_LIBC)
+# if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
+# define _LIBCPP_HAS_QUICK_EXIT
+# endif
+# if _LIBCPP_GLIBC_PREREQ(2, 17)
+# define _LIBCPP_HAS_C11_FEATURES
+# endif
+# else // defined(_LIBCPP_HAS_MUSL_LIBC)
+# define _LIBCPP_HAS_QUICK_EXIT
+# define _LIBCPP_HAS_C11_FEATURES
+# endif
+# endif // __linux__
+#endif
+
#if defined(_LIBCPP_COMPILER_CLANG)
// _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for
@@ -430,28 +452,6 @@ typedef __char32_t char32_t;
#define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES
#endif
-#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
-# if defined(__FreeBSD__)
-# define _LIBCPP_HAS_QUICK_EXIT
-# define _LIBCPP_HAS_C11_FEATURES
-# elif defined(__Fuchsia__)
-# define _LIBCPP_HAS_QUICK_EXIT
-# define _LIBCPP_HAS_C11_FEATURES
-# elif defined(__linux__)
-# if !defined(_LIBCPP_HAS_MUSL_LIBC)
-# if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__)
-# define _LIBCPP_HAS_QUICK_EXIT
-# endif
-# if _LIBCPP_GLIBC_PREREQ(2, 17)
-# define _LIBCPP_HAS_C11_FEATURES
-# endif
-# else // defined(_LIBCPP_HAS_MUSL_LIBC)
-# define _LIBCPP_HAS_QUICK_EXIT
-# define _LIBCPP_HAS_C11_FEATURES
-# endif
-# endif // __linux__
-#endif
-
#if !(__has_feature(cxx_noexcept))
#define _LIBCPP_HAS_NO_NOEXCEPT
#endif