[libcxx-commits] [libcxx] [libc++] Remove the pointer safety functions from the dylib (PR #117390)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 22 14:29:55 PST 2024
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/117390
The pointer safety functions were never implemented by anyone in a non-trivial way,
which lead us to removing them entirely from the headers when they were removed in C++23.
This also means that just about nobody ever called these functions, especially not in
production code. Because of that, we expect there to be no references in the wild to
the functions in the dylib. Because of that, this patch removes the symbols from the
dylib.
>From cad84820b60884e4096f026e96948d7cc736b69d Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Fri, 22 Nov 2024 23:26:12 +0100
Subject: [PATCH] [libc++] Remove the pointer safety functions from the dylib
---
libcxx/src/CMakeLists.txt | 1 -
libcxx/src/legacy_pointer_safety.cpp | 23 -----------------------
2 files changed, 24 deletions(-)
delete mode 100644 libcxx/src/legacy_pointer_safety.cpp
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index cce8b8976f73c0..6d60fa11bf1d20 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -32,7 +32,6 @@ set(LIBCXX_SOURCES
include/ryu/ryu.h
include/to_chars_floating_point.h
include/from_chars_floating_point.h
- legacy_pointer_safety.cpp
memory.cpp
memory_resource.cpp
new_handler.cpp
diff --git a/libcxx/src/legacy_pointer_safety.cpp b/libcxx/src/legacy_pointer_safety.cpp
deleted file mode 100644
index a9361ca879bb58..00000000000000
--- a/libcxx/src/legacy_pointer_safety.cpp
+++ /dev/null
@@ -1,23 +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
-//
-//===----------------------------------------------------------------------===//
-
-#include <__config>
-#include <memory>
-
-// Support for garbage collection was removed in C++23 by https://wg21.link/P2186R2. Libc++ implements
-// that removal as an extension in all Standard versions. However, we still define the functions that
-// were once part of the library's ABI for backwards compatibility.
-
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-_LIBCPP_EXPORTED_FROM_ABI void declare_reachable(void*) {}
-_LIBCPP_EXPORTED_FROM_ABI void declare_no_pointers(char*, size_t) {}
-_LIBCPP_EXPORTED_FROM_ABI void undeclare_no_pointers(char*, size_t) {}
-_LIBCPP_EXPORTED_FROM_ABI void* __undeclare_reachable(void* p) { return p; }
-
-_LIBCPP_END_NAMESPACE_STD
More information about the libcxx-commits
mailing list