Skip to content

Commit fff2db2

Browse files
authored
[libc++] Rename _LIBCPP_INTRODUCED_foo_MARKUP to _LIBCPP_INTRODUCED_foo_ATTRIBUTE (#91269)
This was discussed in #87563 and overlooked when I landed the patch.
1 parent 66364e6 commit fff2db2

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

libcxx/include/__availability

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -87,43 +87,43 @@
8787
#if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
8888

8989
# define _LIBCPP_INTRODUCED_IN_LLVM_4 1
90-
# define _LIBCPP_INTRODUCED_IN_LLVM_4_MARKUP /* nothing */
90+
# define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE /* nothing */
9191

9292
# define _LIBCPP_INTRODUCED_IN_LLVM_9 1
93-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP /* nothing */
94-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_PUSH /* nothing */
95-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_POP /* nothing */
93+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE /* nothing */
94+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
95+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP /* nothing */
9696

9797
# define _LIBCPP_INTRODUCED_IN_LLVM_10 1
98-
# define _LIBCPP_INTRODUCED_IN_LLVM_10_MARKUP /* nothing */
98+
# define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE /* nothing */
9999

100100
# define _LIBCPP_INTRODUCED_IN_LLVM_12 1
101-
# define _LIBCPP_INTRODUCED_IN_LLVM_12_MARKUP /* nothing */
101+
# define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
102102

103103
# define _LIBCPP_INTRODUCED_IN_LLVM_14 1
104-
# define _LIBCPP_INTRODUCED_IN_LLVM_14_MARKUP /* nothing */
104+
# define _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE /* nothing */
105105

106106
# define _LIBCPP_INTRODUCED_IN_LLVM_15 1
107-
# define _LIBCPP_INTRODUCED_IN_LLVM_15_MARKUP /* nothing */
107+
# define _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE /* nothing */
108108

109109
# define _LIBCPP_INTRODUCED_IN_LLVM_16 1
110-
# define _LIBCPP_INTRODUCED_IN_LLVM_16_MARKUP /* nothing */
110+
# define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE /* nothing */
111111

112112
# define _LIBCPP_INTRODUCED_IN_LLVM_18 1
113-
# define _LIBCPP_INTRODUCED_IN_LLVM_18_MARKUP /* nothing */
113+
# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE /* nothing */
114114

115115
# define _LIBCPP_INTRODUCED_IN_LLVM_19 1
116-
# define _LIBCPP_INTRODUCED_IN_LLVM_19_MARKUP /* nothing */
116+
# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE /* nothing */
117117

118118
#elif defined(__APPLE__)
119119

120120
// LLVM 4
121121
# if defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000
122122
# define _LIBCPP_INTRODUCED_IN_LLVM_4 0
123-
# define _LIBCPP_INTRODUCED_IN_LLVM_4_MARKUP __attribute__((availability(watchos, strict, introduced = 5.0)))
123+
# define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE __attribute__((availability(watchos, strict, introduced = 5.0)))
124124
# else
125125
# define _LIBCPP_INTRODUCED_IN_LLVM_4 1
126-
# define _LIBCPP_INTRODUCED_IN_LLVM_4_MARKUP /* nothing */
126+
# define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE /* nothing */
127127
# endif
128128

129129
// LLVM 9
@@ -134,28 +134,28 @@
134134
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
135135
// clang-format on
136136
# define _LIBCPP_INTRODUCED_IN_LLVM_9 0
137-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP \
137+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE \
138138
__attribute__((availability(macos, strict, introduced = 10.15))) \
139139
__attribute__((availability(ios, strict, introduced = 13.0))) \
140140
__attribute__((availability(tvos, strict, introduced = 13.0))) \
141141
__attribute__((availability(watchos, strict, introduced = 6.0)))
142142
// clang-format off
143-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_PUSH \
143+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH \
144144
_Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
145145
_Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \
146146
_Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \
147147
_Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
148-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_POP \
148+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP \
149149
_Pragma("clang attribute pop") \
150150
_Pragma("clang attribute pop") \
151151
_Pragma("clang attribute pop") \
152152
_Pragma("clang attribute pop")
153153
// clang-format on
154154
# else
155155
# define _LIBCPP_INTRODUCED_IN_LLVM_9 1
156-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP /* nothing */
157-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_PUSH /* nothing */
158-
# define _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_POP /* nothing */
156+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE /* nothing */
157+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
158+
# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP /* nothing */
159159
# endif
160160

161161
// LLVM 10
@@ -166,14 +166,14 @@
166166
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000)
167167
// clang-format on
168168
# define _LIBCPP_INTRODUCED_IN_LLVM_10 0
169-
# define _LIBCPP_INTRODUCED_IN_LLVM_10_MARKUP \
169+
# define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE \
170170
__attribute__((availability(macos, strict, introduced = 11.0))) \
171171
__attribute__((availability(ios, strict, introduced = 14.0))) \
172172
__attribute__((availability(tvos, strict, introduced = 14.0))) \
173173
__attribute__((availability(watchos, strict, introduced = 7.0)))
174174
# else
175175
# define _LIBCPP_INTRODUCED_IN_LLVM_10 1
176-
# define _LIBCPP_INTRODUCED_IN_LLVM_10_MARKUP /* nothing */
176+
# define _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE /* nothing */
177177
# endif
178178

179179
// LLVM 12
@@ -184,14 +184,14 @@
184184
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80000)
185185
// clang-format on
186186
# define _LIBCPP_INTRODUCED_IN_LLVM_12 0
187-
# define _LIBCPP_INTRODUCED_IN_LLVM_12_MARKUP \
187+
# define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE \
188188
__attribute__((availability(macos, strict, introduced = 12.0))) \
189189
__attribute__((availability(ios, strict, introduced = 15.0))) \
190190
__attribute__((availability(tvos, strict, introduced = 15.0))) \
191191
__attribute__((availability(watchos, strict, introduced = 8.0)))
192192
# else
193193
# define _LIBCPP_INTRODUCED_IN_LLVM_12 1
194-
# define _LIBCPP_INTRODUCED_IN_LLVM_12_MARKUP /* nothing */
194+
# define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE /* nothing */
195195
# endif
196196

197197
// LLVM 14
@@ -202,54 +202,54 @@
202202
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500)
203203
// clang-format on
204204
# define _LIBCPP_INTRODUCED_IN_LLVM_14 0
205-
# define _LIBCPP_INTRODUCED_IN_LLVM_14_MARKUP \
205+
# define _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE \
206206
__attribute__((availability(macos, strict, introduced = 13.4))) \
207207
__attribute__((availability(ios, strict, introduced = 16.5))) \
208208
__attribute__((availability(tvos, strict, introduced = 16.5))) \
209209
__attribute__((availability(watchos, strict, introduced = 9.5)))
210210
# else
211211
# define _LIBCPP_INTRODUCED_IN_LLVM_14 1
212-
# define _LIBCPP_INTRODUCED_IN_LLVM_14_MARKUP /* nothing */
212+
# define _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE /* nothing */
213213
# endif
214214

215215
// LLVM 15-16
216216
# define _LIBCPP_INTRODUCED_IN_LLVM_15 _LIBCPP_INTRODUCED_IN_LLVM_16
217-
# define _LIBCPP_INTRODUCED_IN_LLVM_15_MARKUP _LIBCPP_INTRODUCED_IN_LLVM_16_MARKUP
217+
# define _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE
218218
// clang-format off
219219
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000) || \
220220
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170000) || \
221221
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170000) || \
222222
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000)
223223
// clang-format on
224224
# define _LIBCPP_INTRODUCED_IN_LLVM_16 0
225-
# define _LIBCPP_INTRODUCED_IN_LLVM_16_MARKUP \
225+
# define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE \
226226
__attribute__((availability(macos, strict, introduced = 14.0))) \
227227
__attribute__((availability(ios, strict, introduced = 17.0))) \
228228
__attribute__((availability(tvos, strict, introduced = 17.0))) \
229229
__attribute__((availability(watchos, strict, introduced = 10.0)))
230230
# else
231231
# define _LIBCPP_INTRODUCED_IN_LLVM_16 1
232-
# define _LIBCPP_INTRODUCED_IN_LLVM_16_MARKUP /* nothing */
232+
# define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE /* nothing */
233233
# endif
234234

235235
// LLVM 18
236236
// TODO: Fill this in
237237
# if 1
238238
# define _LIBCPP_INTRODUCED_IN_LLVM_18 0
239-
# define _LIBCPP_INTRODUCED_IN_LLVM_18_MARKUP __attribute__((unavailable))
239+
# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE __attribute__((unavailable))
240240
# else
241241
# define _LIBCPP_INTRODUCED_IN_LLVM_18 1
242-
# define _LIBCPP_INTRODUCED_IN_LLVM_18_MARKUP /* nothing */
242+
# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE /* nothing */
243243
# endif
244244

245245
// LLVM 19
246246
// TODO: Fill this in
247247
# if 1
248248
# define _LIBCPP_INTRODUCED_IN_LLVM_19 0
249-
# define _LIBCPP_INTRODUCED_IN_LLVM_19_MARKUP __attribute__((unavailable))
249+
# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((unavailable))
250250
# else
251251
# define _LIBCPP_INTRODUCED_IN_LLVM_19 1
252-
# define _LIBCPP_INTRODUCED_IN_LLVM_19_MARKUP /* nothing */
252+
# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE /* nothing */
253253
# endif
254254

255255
#else
@@ -270,27 +270,27 @@
270270
// these exceptions can be used even on older deployment targets, but those
271271
// methods will abort instead of throwing.
272272
#define _LIBCPP_AVAILABILITY_HAS_BAD_OPTIONAL_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4
273-
#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4_MARKUP
273+
#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE
274274

275275
#define _LIBCPP_AVAILABILITY_HAS_BAD_VARIANT_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4
276-
#define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4_MARKUP
276+
#define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE
277277

278278
#define _LIBCPP_AVAILABILITY_HAS_BAD_ANY_CAST _LIBCPP_INTRODUCED_IN_LLVM_4
279-
#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST _LIBCPP_INTRODUCED_IN_LLVM_4_MARKUP
279+
#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE
280280

281281
// These macros control the availability of all parts of <filesystem> that
282282
// depend on something in the dylib.
283283
#define _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY _LIBCPP_INTRODUCED_IN_LLVM_9
284-
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP
285-
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_PUSH
286-
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP _LIBCPP_INTRODUCED_IN_LLVM_9_MARKUP_POP
284+
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE
285+
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH
286+
#define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP
287287

288288
// This controls the availability of the C++20 synchronization library,
289289
// which requires shared library support for various operations
290290
// (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
291291
// <semaphore>, and notification functions on std::atomic.
292292
#define _LIBCPP_AVAILABILITY_HAS_SYNC _LIBCPP_INTRODUCED_IN_LLVM_10
293-
#define _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INTRODUCED_IN_LLVM_10_MARKUP
293+
#define _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INTRODUCED_IN_LLVM_10_ATTRIBUTE
294294

295295
// Enable additional explicit instantiations of iostreams components. This
296296
// reduces the number of weak definitions generated in programs that use
@@ -308,13 +308,13 @@
308308
// This controls the availability of floating-point std::to_chars functions.
309309
// These overloads were added later than the integer overloads.
310310
#define _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT _LIBCPP_INTRODUCED_IN_LLVM_14
311-
#define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_INTRODUCED_IN_LLVM_14_MARKUP
311+
#define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_INTRODUCED_IN_LLVM_14_ATTRIBUTE
312312

313313
// This controls whether the library claims to provide a default verbose
314314
// termination function, and consequently whether the headers will try
315315
// to use it when the mechanism isn't overriden at compile-time.
316316
#define _LIBCPP_AVAILABILITY_HAS_VERBOSE_ABORT _LIBCPP_INTRODUCED_IN_LLVM_15
317-
#define _LIBCPP_AVAILABILITY_VERBOSE_ABORT _LIBCPP_INTRODUCED_IN_LLVM_15_MARKUP
317+
#define _LIBCPP_AVAILABILITY_VERBOSE_ABORT _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE
318318

319319
// This controls the availability of the C++17 std::pmr library,
320320
// which is implemented in large part in the built library.
@@ -330,27 +330,27 @@
330330
// in the built library, which std::make_exception_ptr might use
331331
// (see libcxx/include/__exception/exception_ptr.h).
332332
#define _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION _LIBCPP_INTRODUCED_IN_LLVM_18
333-
#define _LIBCPP_AVAILABILITY_INIT_PRIMARY_EXCEPTION _LIBCPP_INTRODUCED_IN_LLVM_18_MARKUP
333+
#define _LIBCPP_AVAILABILITY_INIT_PRIMARY_EXCEPTION _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE
334334

335335
// This controls the availability of C++23 <print>, which
336336
// has a dependency on the built library (it needs access to
337337
// the underlying buffer types of std::cout, std::cerr, and std::clog.
338338
#define _LIBCPP_AVAILABILITY_HAS_PRINT _LIBCPP_INTRODUCED_IN_LLVM_18
339-
#define _LIBCPP_AVAILABILITY_PRINT _LIBCPP_INTRODUCED_IN_LLVM_18_MARKUP
339+
#define _LIBCPP_AVAILABILITY_PRINT _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE
340340

341341
// This controls the availability of the C++20 time zone database.
342342
// The parser code is built in the library.
343343
#define _LIBCPP_AVAILABILITY_HAS_TZDB _LIBCPP_INTRODUCED_IN_LLVM_19
344-
#define _LIBCPP_AVAILABILITY_TZDB _LIBCPP_INTRODUCED_IN_LLVM_19_MARKUP
344+
#define _LIBCPP_AVAILABILITY_TZDB _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE
345345

346346
// These macros determine whether we assume that std::bad_function_call and
347347
// std::bad_expected_access provide a key function in the dylib. This allows
348348
// centralizing their vtable and typeinfo instead of having all TUs provide
349349
// a weak definition that then gets deduplicated.
350-
# define _LIBCPP_AVAILABILITY_HAS_BAD_FUNCTION_CALL_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19
351-
# define _LIBCPP_AVAILABILITY_BAD_FUNCTION_CALL_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19_MARKUP
352-
# define _LIBCPP_AVAILABILITY_HAS_BAD_EXPECTED_ACCESS_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19
353-
# define _LIBCPP_AVAILABILITY_BAD_EXPECTED_ACCESS_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19_MARKUP
350+
#define _LIBCPP_AVAILABILITY_HAS_BAD_FUNCTION_CALL_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19
351+
#define _LIBCPP_AVAILABILITY_BAD_FUNCTION_CALL_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE
352+
#define _LIBCPP_AVAILABILITY_HAS_BAD_EXPECTED_ACCESS_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19
353+
#define _LIBCPP_AVAILABILITY_BAD_EXPECTED_ACCESS_KEY_FUNCTION _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE
354354

355355
// Define availability attributes that depend on _LIBCPP_HAS_NO_EXCEPTIONS.
356356
// Those are defined in terms of the availability attributes above, and

0 commit comments

Comments
 (0)