Skip to content

[libc++] Remove the deprecated _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED macro #73164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Nov 22, 2023

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

…ORT_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.
@ldionne ldionne requested a review from var-const November 22, 2023 20:09
@ldionne ldionne requested a review from a team as a code owner November 22, 2023 20:09
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Nov 22, 2023
@llvmbot
Copy link
Member

llvmbot commented Nov 22, 2023

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/73164.diff

3 Files Affected:

  • (modified) libcxx/docs/ReleaseNotes/18.rst (+4-4)
  • (modified) libcxx/include/__verbose_abort (-7)
  • (removed) libcxx/test/libcxx/assertions/deprecated-link-time-custom-handler.pass.cpp (-28)
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;
-}

@ldionne ldionne merged commit 48f5855 into llvm:main Nov 22, 2023
@ldionne ldionne deleted the review/remove-custom-verbose-abort-provided-macro branch November 22, 2023 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants