[libcxx-commits] [libcxx] 174322c - [libc++] Mark __cpp_lib_hardware_interference_size as unimplemented. This fxes bug PR41423.
Marek Kurdej via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 23 05:34:12 PDT 2020
Author: Marek Kurdej
Date: 2020-05-23T14:33:50+02:00
New Revision: 174322c2737d699e199db4762aaf4217305ec465
URL: https://github.com/llvm/llvm-project/commit/174322c2737d699e199db4762aaf4217305ec465
DIFF: https://github.com/llvm/llvm-project/commit/174322c2737d699e199db4762aaf4217305ec465.diff
LOG: [libc++] Mark __cpp_lib_hardware_interference_size as unimplemented. This fxes bug PR41423.
Summary:
As described in the bug report:
The commit a8b9f59e8caf378d56e8bfcecdb22184cdabf42d "Implement feature test macros using a script" added test features macros for libc++. Among others, it added `__cpp_lib_hardware_interference_size`. However, there is nothing like std::hardware_constructive_interference_size nor std::hardware_destructive_interference_size, that should be in header <new>.
* https://bugs.llvm.org/show_bug.cgi?id=41423
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D80431
Added:
Modified:
libcxx/docs/FeatureTestMacroTable.rst
libcxx/include/version
libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
libcxx/utils/generate_feature_test_macro_components.py
Removed:
################################################################################
diff --git a/libcxx/docs/FeatureTestMacroTable.rst b/libcxx/docs/FeatureTestMacroTable.rst
index 77c7c68cf962..e8628408afd0 100644
--- a/libcxx/docs/FeatureTestMacroTable.rst
+++ b/libcxx/docs/FeatureTestMacroTable.rst
@@ -100,7 +100,7 @@ Status
------------------------------------------------- -----------------
``__cpp_lib_gcd_lcm`` ``201606L``
------------------------------------------------- -----------------
- ``__cpp_lib_hardware_interference_size`` ``201703L``
+ ``__cpp_lib_hardware_interference_size`` *unimplemented*
------------------------------------------------- -----------------
``__cpp_lib_has_unique_object_representations`` ``201606L``
------------------------------------------------- -----------------
diff --git a/libcxx/include/version b/libcxx/include/version
index 46b0d65cb29b..3951693ea826 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -169,7 +169,7 @@ __cpp_lib_void_t 201411L <type_traits>
// # define __cpp_lib_execution 201603L
# define __cpp_lib_filesystem 201703L
# define __cpp_lib_gcd_lcm 201606L
-# define __cpp_lib_hardware_interference_size 201703L
+// # define __cpp_lib_hardware_interference_size 201703L
# if defined(_LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS)
# define __cpp_lib_has_unique_object_representations 201606L
# endif
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp
index 294c29a739ff..ef834613cad3 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp
@@ -56,11 +56,17 @@
# error "__cpp_lib_destroying_delete should not be defined before c++2a"
# endif
-# ifndef __cpp_lib_hardware_interference_size
-# error "__cpp_lib_hardware_interference_size should be defined in c++17"
-# endif
-# if __cpp_lib_hardware_interference_size != 201703L
-# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17"
+# if !defined(_LIBCPP_VERSION)
+# ifndef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should be defined in c++17"
+# endif
+# if __cpp_lib_hardware_interference_size != 201703L
+# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17"
+# endif
+# else // _LIBCPP_VERSION
+# ifdef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!"
+# endif
# endif
# ifndef __cpp_lib_launder
@@ -85,11 +91,17 @@
# endif
# endif
-# ifndef __cpp_lib_hardware_interference_size
-# error "__cpp_lib_hardware_interference_size should be defined in c++2a"
-# endif
-# if __cpp_lib_hardware_interference_size != 201703L
-# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a"
+# if !defined(_LIBCPP_VERSION)
+# ifndef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should be defined in c++2a"
+# endif
+# if __cpp_lib_hardware_interference_size != 201703L
+# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a"
+# endif
+# else // _LIBCPP_VERSION
+# ifdef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!"
+# endif
# endif
# ifndef __cpp_lib_launder
diff --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
index 34e59e038546..0c2cd5375758 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp
@@ -1074,11 +1074,17 @@
# error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a"
# endif
-# ifndef __cpp_lib_hardware_interference_size
-# error "__cpp_lib_hardware_interference_size should be defined in c++17"
-# endif
-# if __cpp_lib_hardware_interference_size != 201703L
-# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17"
+# if !defined(_LIBCPP_VERSION)
+# ifndef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should be defined in c++17"
+# endif
+# if __cpp_lib_hardware_interference_size != 201703L
+# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17"
+# endif
+# else // _LIBCPP_VERSION
+# ifdef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!"
+# endif
# endif
# if TEST_HAS_BUILTIN_IDENTIFIER(__has_unique_object_representations) || TEST_GCC_VER >= 700
@@ -1789,11 +1795,17 @@
# endif
# endif
-# ifndef __cpp_lib_hardware_interference_size
-# error "__cpp_lib_hardware_interference_size should be defined in c++2a"
-# endif
-# if __cpp_lib_hardware_interference_size != 201703L
-# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a"
+# if !defined(_LIBCPP_VERSION)
+# ifndef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should be defined in c++2a"
+# endif
+# if __cpp_lib_hardware_interference_size != 201703L
+# error "__cpp_lib_hardware_interference_size should have the value 201703L in c++2a"
+# endif
+# else // _LIBCPP_VERSION
+# ifdef __cpp_lib_hardware_interference_size
+# error "__cpp_lib_hardware_interference_size should not be defined because it is unimplemented in libc++!"
+# endif
# endif
# if TEST_HAS_BUILTIN_IDENTIFIER(__has_unique_object_representations) || TEST_GCC_VER >= 700
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index d19e358482b5..4a9772cfc66d 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -200,6 +200,7 @@ def add_version_header(tc):
"c++17": int(201703),
},
"headers": ["new"],
+ "unimplemented": True,
},
{"name": "__cpp_lib_launder",
"values": {
More information about the libcxx-commits
mailing list