xref: /freebsd/contrib/llvm-project/libcxx/src/legacy_pointer_safety.cpp (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
2349cc55cSDimitry Andric //
3349cc55cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4349cc55cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5349cc55cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6349cc55cSDimitry Andric //
7349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
8349cc55cSDimitry Andric 
981ad6265SDimitry Andric #include <__config>
10349cc55cSDimitry Andric #include <memory>
11349cc55cSDimitry Andric 
12349cc55cSDimitry Andric // Support for garbage collection was removed in C++23 by https://wg21.link/P2186R2. Libc++ implements
13349cc55cSDimitry Andric // that removal as an extension in all Standard versions. However, we still define the functions that
14349cc55cSDimitry Andric // were once part of the library's ABI for backwards compatibility.
15349cc55cSDimitry Andric 
16349cc55cSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
17349cc55cSDimitry Andric 
declare_reachable(void *)18*06c3fb27SDimitry Andric _LIBCPP_EXPORTED_FROM_ABI void declare_reachable(void*) {}
declare_no_pointers(char *,size_t)19*06c3fb27SDimitry Andric _LIBCPP_EXPORTED_FROM_ABI void declare_no_pointers(char*, size_t) {}
undeclare_no_pointers(char *,size_t)20*06c3fb27SDimitry Andric _LIBCPP_EXPORTED_FROM_ABI void undeclare_no_pointers(char*, size_t) {}
__undeclare_reachable(void * p)21*06c3fb27SDimitry Andric _LIBCPP_EXPORTED_FROM_ABI void* __undeclare_reachable(void* p) { return p; }
22349cc55cSDimitry Andric 
23349cc55cSDimitry Andric _LIBCPP_END_NAMESPACE_STD
24