[libcxx-commits] [PATCH] D73732: Add _LIBCPP_BUILTIN_CONSTANT_P support.
Martijn Vels via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 26 08:05:10 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG07eb82fc06cc: Add _LIBCPP_BUILTIN_CONSTANT_P support. (authored by mvels).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73732/new/
https://reviews.llvm.org/D73732
Files:
libcxx/include/__config
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -496,6 +496,10 @@
#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER
#endif
+#if __has_builtin(__builtin_constant_p)
+#define _LIBCPP_COMPILER_HAS_BUILTIN_CONSTANT_P
+#endif
+
#if !__is_identifier(__has_unique_object_representations)
#define _LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS
#endif
@@ -537,9 +541,7 @@
#if _GNUC_VER >= 700
#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER
-#endif
-
-#if _GNUC_VER >= 700
+#define _LIBCPP_COMPILER_HAS_BUILTIN_CONSTANT_P
#define _LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS
#endif
@@ -1533,6 +1535,12 @@
# define _LIBCPP_FOPEN_CLOEXEC_MODE
#endif
+#ifdef _LIBCPP_COMPILER_HAS_BUILTIN_CONSTANT_P
+#define _LIBCPP_BUILTIN_CONSTANT_P(x) __builtin_constant_p(x)
+#else
+#define _LIBCPP_BUILTIN_CONSTANT_P(x) false
+#endif
+
#endif // __cplusplus
#endif // _LIBCPP_CONFIG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73732.246737.patch
Type: text/x-patch
Size: 977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200226/2f2dc7cf/attachment.bin>
More information about the libcxx-commits
mailing list