1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef _LIBCPP___CONFIGURATION_ATTRIBUTES_H
10#define _LIBCPP___CONFIGURATION_ATTRIBUTES_H
11
12#include <__config_site>
13#include <__configuration/hardening.h>
14#include <__configuration/language.h>
15#include <__configuration/utility.h>
16
17#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
18# pragma GCC system_header
19#endif
20
21#ifndef __has_declspec_attribute
22# define __has_declspec_attribute(__x) 0
23#endif
24
25// Attributes relevant for layout ABI
26// ----------------------------------
27
28#if __has_cpp_attribute(msvc::no_unique_address)
29// MSVC implements [[no_unique_address]] as a silent no-op currently.
30// (If/when MSVC breaks its C++ ABI, it will be changed to work as intended.)
31// However, MSVC implements [[msvc::no_unique_address]] which does what
32// [[no_unique_address]] is supposed to do, in general.
33# define _LIBCPP_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
34#else
35# define _LIBCPP_NO_UNIQUE_ADDRESS [[__no_unique_address__]]
36#endif
37
38#define _LIBCPP_PACKED __attribute__((__packed__))
39
40// Attributes affecting overload resolution
41// ----------------------------------------
42
43#if __has_attribute(__enable_if__)
44# define _LIBCPP_PREFERRED_OVERLOAD __attribute__((__enable_if__(true, "")))
45#endif
46
47// Visibility attributes
48// ---------------------
49
50#if defined(_LIBCPP_OBJECT_FORMAT_COFF)
51
52# ifdef _DLL
53# define _LIBCPP_CRT_FUNC __declspec(dllimport)
54# else
55# define _LIBCPP_CRT_FUNC
56# endif
57
58# if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) || (defined(__MINGW32__) && !defined(_LIBCPP_BUILDING_LIBRARY))
59# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
60# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
61# define _LIBCPP_OVERRIDABLE_FUNC_VIS
62# define _LIBCPP_EXPORTED_FROM_ABI
63# elif defined(_LIBCPP_BUILDING_LIBRARY)
64# if defined(__MINGW32__)
65# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __declspec(dllexport)
66# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
67# else
68# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
69# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __declspec(dllexport)
70# endif
71# define _LIBCPP_OVERRIDABLE_FUNC_VIS __declspec(dllexport)
72# define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllexport)
73# else
74# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __declspec(dllimport)
75# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
76# define _LIBCPP_OVERRIDABLE_FUNC_VIS
77# define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllimport)
78# endif
79
80# define _LIBCPP_HIDDEN
81# define _LIBCPP_TEMPLATE_DATA_VIS
82# define _LIBCPP_NAMESPACE_VISIBILITY
83
84#else
85
86# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
87# define _LIBCPP_VISIBILITY(vis) __attribute__((__visibility__(vis)))
88# else
89# define _LIBCPP_VISIBILITY(vis)
90# endif
91
92# define _LIBCPP_HIDDEN _LIBCPP_VISIBILITY("hidden")
93# define _LIBCPP_TEMPLATE_DATA_VIS _LIBCPP_VISIBILITY("default")
94# define _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_VISIBILITY("default")
95# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_VISIBILITY("default")
96# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
97
98// TODO: Make this a proper customization point or remove the option to override it.
99# ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
100# define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_VISIBILITY("default")
101# endif
102
103# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
104# define _LIBCPP_NAMESPACE_VISIBILITY __attribute__((__type_visibility__("default")))
105# elif !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
106# define _LIBCPP_NAMESPACE_VISIBILITY __attribute__((__visibility__("default")))
107# else
108# define _LIBCPP_NAMESPACE_VISIBILITY
109# endif
110
111#endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
112
113// hide_from_abi
114// -------------
115
116#define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))
117
118#if __has_attribute(exclude_from_explicit_instantiation)
119# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION __attribute__((__exclude_from_explicit_instantiation__))
120#else
121// Try to approximate the effect of exclude_from_explicit_instantiation
122// (which is that entities are not assumed to be provided by explicit
123// template instantiations in the dylib) by always inlining those entities.
124# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
125#endif
126
127#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_FAST
128# define _LIBCPP_HARDENING_SIG f
129#elif _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_EXTENSIVE
130# define _LIBCPP_HARDENING_SIG s
131#elif _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG
132# define _LIBCPP_HARDENING_SIG d
133#else
134# define _LIBCPP_HARDENING_SIG n // "none"
135#endif
136
137#if _LIBCPP_ASSERTION_SEMANTIC == _LIBCPP_ASSERTION_SEMANTIC_OBSERVE
138# define _LIBCPP_ASSERTION_SEMANTIC_SIG o
139#elif _LIBCPP_ASSERTION_SEMANTIC == _LIBCPP_ASSERTION_SEMANTIC_QUICK_ENFORCE
140# define _LIBCPP_ASSERTION_SEMANTIC_SIG q
141#elif _LIBCPP_ASSERTION_SEMANTIC == _LIBCPP_ASSERTION_SEMANTIC_ENFORCE
142# define _LIBCPP_ASSERTION_SEMANTIC_SIG e
143#else
144# define _LIBCPP_ASSERTION_SEMANTIC_SIG i // `ignore`
145#endif
146
147#if !_LIBCPP_HAS_EXCEPTIONS
148# define _LIBCPP_EXCEPTIONS_SIG n
149#else
150# define _LIBCPP_EXCEPTIONS_SIG e
151#endif
152
153// clang-format off
154#define _LIBCPP_ODR_SIGNATURE \
155 _LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_CONCAT(_LIBCPP_CONCAT( \
156 _LIBCPP_HARDENING_SIG, \
157 _LIBCPP_VERSION), \
158 _LIBCPP_ASSERTION_SEMANTIC_SIG), \
159 _LIBCPP_EXCEPTIONS_SIG), \
160 _LIBCPP_STD_VER)
161// clang-format on
162
163// This macro marks a symbol as being hidden from libc++'s ABI. This is achieved
164// on two levels:
165// 1. The symbol is given hidden visibility, which ensures that users won't start exporting
166// symbols from their dynamic library by means of using the libc++ headers. This ensures
167// that those symbols stay private to the dynamic library in which it is defined.
168//
169// 2. The symbol is given an ABI tag that encodes the ODR-relevant properties of the library.
170// This ensures that no ODR violation can arise from mixing two TUs compiled with different
171// versions or configurations of libc++ (such as exceptions vs no-exceptions). Indeed, if the
172// program contains two definitions of a function, the ODR requires them to be token-by-token
173// equivalent, and the linker is allowed to pick either definition and discard the other one.
174//
175// For example, if a program contains a copy of `vector::at()` compiled with exceptions enabled
176// *and* a copy of `vector::at()` compiled with exceptions disabled (by means of having two TUs
177// compiled with different settings), the two definitions are both visible by the linker and they
178// have the same name, but they have a meaningfully different implementation (one throws an exception
179// and the other aborts the program). This violates the ODR and makes the program ill-formed, and in
180// practice what will happen is that the linker will pick one of the definitions at random and will
181// discard the other one. This can quite clearly lead to incorrect program behavior.
182//
183// A similar reasoning holds for many other properties that are ODR-affecting. Essentially any
184// property that causes the code of a function to differ from the code in another configuration
185// can be considered ODR-affecting. In practice, we don't encode all such properties in the ABI
186// tag, but we encode the ones that we think are most important: library version, exceptions, and
187// hardening mode.
188//
189// Note that historically, solving this problem has been achieved in various ways, including
190// force-inlining all functions or giving internal linkage to all functions. Both these previous
191// solutions suffer from drawbacks that lead notably to code bloat.
192//
193// Note that we use _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION to ensure that we don't depend
194// on _LIBCPP_HIDE_FROM_ABI methods of classes explicitly instantiated in the dynamic library.
195//
196// Also note that the _LIBCPP_HIDE_FROM_ABI_VIRTUAL macro should be used on virtual functions
197// instead of _LIBCPP_HIDE_FROM_ABI. That macro does not use an ABI tag. Indeed, the mangled
198// name of a virtual function is part of its ABI, since some architectures like arm64e can sign
199// the virtual function pointer in the vtable based on the mangled name of the function. Since
200// we use an ABI tag that changes with each released version, the mangled name of the virtual
201// function would change, which is incorrect. Note that it doesn't make much sense to change
202// the implementation of a virtual function in an ABI-incompatible way in the first place,
203// since that would be an ABI break anyway. Hence, the lack of ABI tag should not be noticeable.
204//
205// The macro can be applied to record and enum types. When the tagged type is nested in
206// a record this "parent" record needs to have the macro too. Another use case for applying
207// this macro to records and unions is to apply an ABI tag to inline constexpr variables.
208// This can be useful for inline variables that are implementation details which are expected
209// to change in the future.
210//
211// TODO: We provide a escape hatch with _LIBCPP_NO_ABI_TAG for folks who want to avoid increasing
212// the length of symbols with an ABI tag. In practice, we should remove the escape hatch and
213// use compression mangling instead, see https://github.com/itanium-cxx-abi/cxx-abi/issues/70.
214#ifndef _LIBCPP_NO_ABI_TAG
215# define _LIBCPP_HIDE_FROM_ABI \
216 _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION \
217 __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
218#else
219# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
220#endif
221#define _LIBCPP_HIDE_FROM_ABI_VIRTUAL _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
222
223// This macro makes sure that private classes which aren't necessarily part of the ABI change their name every release.
224// The intention is _not_ to put it on every private class, but only on classes where type name stability implies ABI
225// stability. This is essentially the case for classes that are only accessed through the vtable after instantiation,
226// for example the control blocks of `shared_ptr`. These classes can change in ABI breaking ways as long as their name
227// (and hence their vtable symbol) changes too. Note that the vtable and RTTI are not marked with
228// [[gnu::visibility("hidden")]], since the vtable and RTTI should still be deduplicated across dylibs with the same
229// instatiations.
230#ifndef _LIBCPP_NO_ABI_TAG
231# define _LIBCPP_HIDE_STRUCT_FROM_ABI [[__gnu__::__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))]]
232#else
233# define _LIBCPP_HIDE_STRUCT_FROM_ABI
234#endif
235
236// Optional attributes
237// -------------------
238
239// these are useful for a better QoI, but not required to be available
240
241#define _LIBCPP_NOALIAS __attribute__((__malloc__))
242#define _LIBCPP_NODEBUG [[__gnu__::__nodebug__]]
243#define _LIBCPP_NO_SANITIZE(...) __attribute__((__no_sanitize__(__VA_ARGS__)))
244#define _LIBCPP_INIT_PRIORITY_MAX __attribute__((__init_priority__(100)))
245#define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index) \
246 __attribute__((__format__(archetype, format_string_index, first_format_arg_index)))
247
248#if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
249# define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
250#else
251# define _LIBCPP_NO_CFI
252#endif
253
254#if __has_attribute(__using_if_exists__)
255# define _LIBCPP_USING_IF_EXISTS __attribute__((__using_if_exists__))
256#else
257# define _LIBCPP_USING_IF_EXISTS
258#endif
259
260#if __has_cpp_attribute(_Clang::__no_destroy__)
261# define _LIBCPP_NO_DESTROY [[_Clang::__no_destroy__]]
262#else
263# define _LIBCPP_NO_DESTROY
264#endif
265
266#if __has_attribute(__diagnose_if__)
267# define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((__diagnose_if__(__VA_ARGS__, "warning")))
268#else
269# define _LIBCPP_DIAGNOSE_WARNING(...)
270#endif
271
272#if __has_attribute(__diagnose_if__)
273# define _LIBCPP_DIAGNOSE_IF(...) __attribute__((__diagnose_if__(__VA_ARGS__)))
274#else
275# define _LIBCPP_DIAGNOSE_IF(...)
276#endif
277
278#define _LIBCPP_DIAGNOSE_NULLPTR_IF(condition, condition_description) \
279 _LIBCPP_DIAGNOSE_IF( \
280 condition, \
281 "null passed to callee that requires a non-null argument" condition_description, \
282 "warning", \
283 "nonnull")
284
285#if __has_cpp_attribute(_Clang::__lifetimebound__)
286# define _LIBCPP_LIFETIMEBOUND [[_Clang::__lifetimebound__]]
287#else
288# define _LIBCPP_LIFETIMEBOUND
289#endif
290
291// This is to work around https://llvm.org/PR156809
292#ifndef _LIBCPP_CXX03_LANG
293# define _LIBCPP_CTOR_LIFETIMEBOUND _LIBCPP_LIFETIMEBOUND
294#else
295# define _LIBCPP_CTOR_LIFETIMEBOUND
296#endif
297
298#if __has_cpp_attribute(_Clang::__noescape__)
299# define _LIBCPP_NOESCAPE [[_Clang::__noescape__]]
300#else
301# define _LIBCPP_NOESCAPE
302#endif
303
304#if __has_cpp_attribute(_Clang::__no_specializations__)
305# define _LIBCPP_NO_SPECIALIZATIONS \
306 [[_Clang::__no_specializations__("Users are not allowed to specialize this standard library entity")]]
307#else
308# define _LIBCPP_NO_SPECIALIZATIONS
309#endif
310
311#if __has_cpp_attribute(_Clang::__preferred_name__)
312# define _LIBCPP_PREFERRED_NAME(x) [[_Clang::__preferred_name__(x)]]
313#else
314# define _LIBCPP_PREFERRED_NAME(x)
315#endif
316
317#if __has_cpp_attribute(_Clang::__scoped_lockable__)
318# define _LIBCPP_SCOPED_LOCKABLE [[_Clang::__scoped_lockable__]]
319#else
320# define _LIBCPP_SCOPED_LOCKABLE
321#endif
322
323#if __has_cpp_attribute(_Clang::__capability__)
324# define _LIBCPP_CAPABILITY(...) [[_Clang::__capability__(__VA_ARGS__)]]
325#else
326# define _LIBCPP_CAPABILITY(...)
327#endif
328
329#if __has_attribute(__acquire_capability__)
330# define _LIBCPP_ACQUIRE_CAPABILITY(...) __attribute__((__acquire_capability__(__VA_ARGS__)))
331#else
332# define _LIBCPP_ACQUIRE_CAPABILITY(...)
333#endif
334
335#if __has_cpp_attribute(_Clang::__try_acquire_capability__)
336# define _LIBCPP_TRY_ACQUIRE_CAPABILITY(...) [[_Clang::__try_acquire_capability__(__VA_ARGS__)]]
337#else
338# define _LIBCPP_TRY_ACQUIRE_CAPABILITY(...)
339#endif
340
341#if __has_cpp_attribute(_Clang::__acquire_shared_capability__)
342# define _LIBCPP_ACQUIRE_SHARED_CAPABILITY [[_Clang::__acquire_shared_capability__]]
343#else
344# define _LIBCPP_ACQUIRE_SHARED_CAPABILITY
345#endif
346
347#if __has_cpp_attribute(_Clang::__try_acquire_shared_capability__)
348# define _LIBCPP_TRY_ACQUIRE_SHARED_CAPABILITY(...) [[_Clang::__try_acquire_shared_capability__(__VA_ARGS__)]]
349#else
350# define _LIBCPP_TRY_ACQUIRE_SHARED_CAPABILITY(...)
351#endif
352
353#if __has_attribute(__release_capability__)
354# define _LIBCPP_RELEASE_CAPABILITY(...) __attribute__((__release_capability__(__VA_ARGS__)))
355#else
356# define _LIBCPP_RELEASE_CAPABILITY(...)
357#endif
358
359#if __has_cpp_attribute(_Clang::__release_shared_capability__)
360# define _LIBCPP_RELEASE_SHARED_CAPABILITY [[_Clang::__release_shared_capability__]]
361#else
362# define _LIBCPP_RELEASE_SHARED_CAPABILITY
363#endif
364
365#if __has_attribute(__requires_capability__)
366# define _LIBCPP_REQUIRES_CAPABILITY(...) __attribute__((__requires_capability__(__VA_ARGS__)))
367#else
368# define _LIBCPP_REQUIRES_CAPABILITY(...)
369#endif
370
371#if __has_cpp_attribute(_Clang::__no_thread_safety_analysis__)
372# define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS [[_Clang::__no_thread_safety_analysis__]]
373#else
374# define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
375#endif
376
377#if defined(_LIBCPP_ABI_MICROSOFT) && __has_declspec_attribute(empty_bases)
378# define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
379#else
380# define _LIBCPP_DECLSPEC_EMPTY_BASES
381#endif
382
383// Allow for build-time disabling of unsigned integer sanitization
384#if __has_attribute(no_sanitize) && !defined(_LIBCPP_COMPILER_GCC)
385# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
386#else
387# define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
388#endif
389
390#if __has_feature(nullability)
391# define _LIBCPP_DIAGNOSE_NULLPTR _Nonnull
392#else
393# define _LIBCPP_DIAGNOSE_NULLPTR
394#endif
395
396#if defined(__CUDACC__) || defined(__CUDA_ARCH__) || defined(__CUDA_LIBDEVICE__)
397// The CUDA SDK contains an unfortunate definition for the __noinline__ macro,
398// which breaks the regular __attribute__((__noinline__)) syntax. Therefore,
399// when compiling for CUDA we use the non-underscored version of the noinline
400// attribute.
401//
402// This is a temporary workaround and we still expect the CUDA SDK team to solve
403// this issue properly in the SDK headers.
404//
405// See https://github.com/llvm/llvm-project/pull/73838 for more details.
406# define _LIBCPP_NOINLINE __attribute__((noinline))
407#elif __has_attribute(__noinline__)
408# define _LIBCPP_NOINLINE __attribute__((__noinline__))
409#else
410# define _LIBCPP_NOINLINE
411#endif
412
413// Deprecation macros
414// ------------------
415
416// Deprecations warnings are always enabled, except when users explicitly opt-out
417// by defining _LIBCPP_DISABLE_DEPRECATION_WARNINGS.
418#if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
419# if __has_attribute(__deprecated__)
420# define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
421# define _LIBCPP_DEPRECATED_(m) __attribute__((__deprecated__(m)))
422# elif _LIBCPP_STD_VER >= 14
423# define _LIBCPP_DEPRECATED [[deprecated]]
424# define _LIBCPP_DEPRECATED_(m) [[deprecated(m)]]
425# else
426# define _LIBCPP_DEPRECATED
427# define _LIBCPP_DEPRECATED_(m)
428# endif
429#else
430# define _LIBCPP_DEPRECATED
431# define _LIBCPP_DEPRECATED_(m)
432#endif
433
434#if !defined(_LIBCPP_CXX03_LANG)
435# define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
436#else
437# define _LIBCPP_DEPRECATED_IN_CXX11
438#endif
439
440#if _LIBCPP_STD_VER >= 14
441# define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
442#else
443# define _LIBCPP_DEPRECATED_IN_CXX14
444#endif
445
446#if _LIBCPP_STD_VER >= 17
447# define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
448#else
449# define _LIBCPP_DEPRECATED_IN_CXX17
450#endif
451
452#if _LIBCPP_STD_VER >= 20
453# define _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_DEPRECATED
454#else
455# define _LIBCPP_DEPRECATED_IN_CXX20
456#endif
457
458#if _LIBCPP_STD_VER >= 23
459# define _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_DEPRECATED
460#else
461# define _LIBCPP_DEPRECATED_IN_CXX23
462#endif
463
464#if _LIBCPP_STD_VER >= 26
465# define _LIBCPP_DEPRECATED_IN_CXX26 _LIBCPP_DEPRECATED
466# define _LIBCPP_DEPRECATED_IN_CXX26_(m) _LIBCPP_DEPRECATED_(m)
467#else
468# define _LIBCPP_DEPRECATED_IN_CXX26
469# define _LIBCPP_DEPRECATED_IN_CXX26_(m)
470#endif
471
472#if _LIBCPP_HAS_CHAR8_T
473# define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED
474#else
475# define _LIBCPP_DEPRECATED_WITH_CHAR8_T
476#endif
477
478#if __has_cpp_attribute(_Clang::__no_field_protection__)
479# define _LIBCPP_DISABLE_POINTER_FIELD_PROTECTION [[_Clang::__no_field_protection__]]
480#else
481# define _LIBCPP_DISABLE_POINTER_FIELD_PROTECTION
482#endif
483
484// TODO(LLVM 25): Remove this escape hatch
485#ifndef _LIBCPP_DISABLE_UNUSED_STRUCT_WARNINGS
486# define _LIBCPP_WARN_UNUSED [[__gnu__::__warn_unused__]]
487#else
488# define _LIBCPP_WARN_UNUSED
489#endif
490
491#endif // _LIBCPP___CONFIGURATION_ATTRIBUTES_H
492