[libcxx-commits] [libcxx] 5795e7b - [libc++][hardening][NFC] Fix the 17 release notes to remove mentions of hardening

Konstantin Varlamov via libcxx-commits libcxx-commits at lists.llvm.org
Fri Sep 8 11:41:37 PDT 2023


Author: Konstantin Varlamov
Date: 2023-09-08T11:41:13-07:00
New Revision: 5795e7ba3ed82f703b4494897ab63aa989e1ea69

URL: https://github.com/llvm/llvm-project/commit/5795e7ba3ed82f703b4494897ab63aa989e1ea69
DIFF: https://github.com/llvm/llvm-project/commit/5795e7ba3ed82f703b4494897ab63aa989e1ea69.diff

LOG: [libc++][hardening][NFC] Fix the 17 release notes to remove mentions of hardening

This is to bring `main` in sync with `release/17.x` after https://reviews.llvm.org/D159171.

Differential Revision: https://reviews.llvm.org/D159454

Added: 
    

Modified: 
    libcxx/CMakeLists.txt
    libcxx/docs/ReleaseNotes/17.rst
    libcxx/docs/ReleaseNotes/18.rst
    libcxx/include/__config
    libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_hardened_mode.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 16f487f7c19c871..c729542d8cd370b 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -786,7 +786,7 @@ elseif (LIBCXX_HARDENING_MODE STREQUAL "unchecked")
   config_define(0 _LIBCPP_ENABLE_HARDENED_MODE_DEFAULT)
   config_define(0 _LIBCPP_ENABLE_DEBUG_MODE_DEFAULT)
 endif()
-# TODO(LLVM 18): Remove this after branching for LLVM 17, this is a simple
+# TODO(LLVM 19): Remove this after branching for LLVM 18, this is a simple
 # courtesy for vendors to be notified about this change.
 if (LIBCXX_ENABLE_ASSERTIONS)
   message(FATAL_ERROR "LIBCXX_ENABLE_ASSERTIONS has been replaced by LIBCXX_HARDENING_MODE=hardened")

diff  --git a/libcxx/docs/ReleaseNotes/17.rst b/libcxx/docs/ReleaseNotes/17.rst
index dac4c3c63324631..4f9f17bdb5d7a9d 100644
--- a/libcxx/docs/ReleaseNotes/17.rst
+++ b/libcxx/docs/ReleaseNotes/17.rst
@@ -87,9 +87,6 @@ Improvements and New Features
   ``std::ranges::find``  are now forwarding to ``std::memcmp`` for trivially
   equality comparable types, which can lead up to 40x performance improvements.
 
-- ``std::string_view`` now provides iterators that check for out-of-bounds accesses when the safe
-  libc++ mode is enabled.
-
 - The performance of ``dynamic_cast`` on its hot paths is greatly improved and is as efficient as the
   ``libsupc++`` implementation. Note that the performance improvements are shipped in ``libcxxabi``.
 
@@ -128,14 +125,8 @@ Improvements and New Features
 Deprecations and Removals
 -------------------------
 
-- The "safe" mode is replaced by the hardened mode in this release. The ``LIBCXX_ENABLE_ASSERTIONS`` CMake variable is
-  deprecated and setting it will trigger an error; use ``LIBCXX_HARDENING_MODE`` instead. Similarly, the
-  ``_LIBCPP_ENABLE_ASSERTIONS`` macro is deprecated and setting it to ``1`` now enables the hardened mode. See
-  ``libcxx/docs/Hardening.rst`` for more details.
-
-- The legacy debug mode has been removed in this release. Setting the macro ``_LIBCPP_ENABLE_DEBUG_MODE`` to ``1`` now
-  enables the new debug mode which is part of hardening (see the "Improvements and New Features" section above). The
-  ``LIBCXX_ENABLE_DEBUG_MODE`` CMake variable has been removed. For additional context, refer to the `Discourse post
+- The legacy debug mode has been removed in this release. The ``LIBCXX_ENABLE_DEBUG_MODE`` CMake variable has been
+  removed. For additional context, refer to the `Discourse post
   <https://discourse.llvm.org/t/rfc-removing-the-legacy-debug-mode-from-libc/71026>`_.
 
 - The ``<experimental/coroutine>`` header has been removed in this release. The ``<coroutine>`` header

diff  --git a/libcxx/docs/ReleaseNotes/18.rst b/libcxx/docs/ReleaseNotes/18.rst
index b10c8fa78c2270d..baf270e5a45c8e4 100644
--- a/libcxx/docs/ReleaseNotes/18.rst
+++ b/libcxx/docs/ReleaseNotes/18.rst
@@ -35,6 +35,15 @@ see the `releases page <https://llvm.org/releases/>`_.
 What's New in Libc++ 18.0.0?
 ==============================
 
+- The "safe" mode is replaced by the hardened mode in this release. The
+  ``LIBCXX_ENABLE_ASSERTIONS`` CMake variable is deprecated and setting it will
+  trigger an error; use ``LIBCXX_HARDENING_MODE`` instead. Similarly, the
+  ``_LIBCPP_ENABLE_ASSERTIONS`` macro is deprecated and setting it to ``1`` now
+  enables the hardened mode. See ``libcxx/docs/Hardening.rst`` for more details.
+
+- A new debug mode has been added, replacing the legacy debug mode that was
+  removed in the LLVM 17 release. See ``libcxx/docs/Hardening.rst`` for more
+  details.
 
 Implemented Papers
 ------------------

diff  --git a/libcxx/include/__config b/libcxx/include/__config
index 26ee189f22f0ade..69305d31144ad94 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -202,7 +202,7 @@
 
 // HARDENING {
 
-// TODO(hardening): remove this in LLVM 18.
+// TODO(hardening): remove this in LLVM 19.
 // This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes)
 // equivalent to setting the hardened mode.
 #  ifdef _LIBCPP_ENABLE_ASSERTIONS

diff  --git a/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_hardened_mode.pass.cpp b/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_hardened_mode.pass.cpp
index 1b7b4f20136abd7..48243a58e74627d 100644
--- a/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_hardened_mode.pass.cpp
+++ b/libcxx/test/libcxx/assertions/modes/enabling_assertions_enables_hardened_mode.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// TODO(hardening): remove in LLVM 18.
+// TODO(hardening): remove in LLVM 19.
 // This test ensures that enabling assertions now enables the hardened mode.
 
 // `check_assertion.h` is only available starting from C++11 and requires Unix headers.


        


More information about the libcxx-commits mailing list