[libcxx-commits] [libcxx] [libc++] Remove the deprecated _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED macro (PR #73164)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 22 12:09:36 PST 2023


https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/73164

We release-noted that we were going to remove it in the LLVM 18 timeline and we've been issuing a warning since then.

>From 081e7efa2549fe8553d4add36958cb7c1fdbeda6 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 22 Nov 2023 15:08:37 -0500
Subject: [PATCH] [libc++] Remove the deprecated
 _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED macro

We release-noted that we were going to remove it in the LLVM 18 timeline
and we've been issuing a warning since then.
---
 libcxx/docs/ReleaseNotes/18.rst               |  8 +++---
 libcxx/include/__verbose_abort                |  7 -----
 ...precated-link-time-custom-handler.pass.cpp | 28 -------------------
 3 files changed, 4 insertions(+), 39 deletions(-)
 delete mode 100644 libcxx/test/libcxx/assertions/deprecated-link-time-custom-handler.pass.cpp

diff --git a/libcxx/docs/ReleaseNotes/18.rst b/libcxx/docs/ReleaseNotes/18.rst
index 1a5b959eac6ce66..f223399cd3f0f92 100644
--- a/libcxx/docs/ReleaseNotes/18.rst
+++ b/libcxx/docs/ReleaseNotes/18.rst
@@ -87,16 +87,16 @@ Deprecations and Removals
   macro is provided to restore the previous behavior, and it will be supported in the LLVM 18 release only.
   In LLVM 19 and beyond, ``_LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT`` will not be honored anymore.
 
+- The ``_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED`` macro is not honored anymore in LLVM 18.
+  Please see the updated documentation about the hardening modes in libc++ and in particular the
+  ``_LIBCPP_VERBOSE_ABORT`` macro for details.
+
 Upcoming Deprecations and Removals
 ----------------------------------
 
 LLVM 18
 ~~~~~~~
 
-- The ``_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED`` macro will not be honored anymore in LLVM 18.
-  Please see the updated documentation about the hardening modes in libc++ and in particular the
-  ``_LIBCPP_VERBOSE_ABORT`` macro for details.
-
 - The headers ``<experimental/deque>``, ``<experimental/forward_list>``, ``<experimental/list>``,
   ``<experimental/map>``, ``<experimental/memory_resource>``, ``<experimental/regex>``, ``<experimental/set>``,
   ``<experimental/string>``, ``<experimental/unordered_map>``, ``<experimental/unordered_set>``,
diff --git a/libcxx/include/__verbose_abort b/libcxx/include/__verbose_abort
index a38284b711f3628..8970ea00f03baa2 100644
--- a/libcxx/include/__verbose_abort
+++ b/libcxx/include/__verbose_abort
@@ -38,13 +38,6 @@ void __libcpp_verbose_abort(const char *__format, ...);
 // make sure that the program terminates but without taking any complex dependencies in this header.
 #if !defined(_LIBCPP_VERBOSE_ABORT)
 
-// Support _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED until LLVM 18, but tell people
-// to move to customizing _LIBCPP_VERBOSE_ABORT instead.
-#  if defined(_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT) && defined(_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED)
-#    undef _LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT
-#    warning _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED is deprecated, please customize _LIBCPP_VERBOSE_ABORT instead
-#  endif
-
 #  if defined(_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT)
 // The decltype is there to suppress -Wunused warnings in this configuration.
 void __use(const char*, ...);
diff --git a/libcxx/test/libcxx/assertions/deprecated-link-time-custom-handler.pass.cpp b/libcxx/test/libcxx/assertions/deprecated-link-time-custom-handler.pass.cpp
deleted file mode 100644
index 47cb53c7a8786a7..000000000000000
--- a/libcxx/test/libcxx/assertions/deprecated-link-time-custom-handler.pass.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// XFAIL: availability-verbose_abort-missing
-
-// Make sure that we still support _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED for folks
-// who customize the verbose termination function at link-time in back-deployment environments.
-
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED
-
-// We emit a #warning about the deprecation of this setting, so make sure we don't turn that into an error.
-// ADDITIONAL_COMPILE_FLAGS: -Wno-error
-
-#include <cstdlib>
-
-void std::__libcpp_verbose_abort(char const*, ...) {
-  std::exit(EXIT_SUCCESS);
-}
-
-int main(int, char**) {
-  _LIBCPP_ASSERT(false, "message");
-  return EXIT_FAILURE;
-}



More information about the libcxx-commits mailing list