|
116 | 116 | # define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH /* nothing */
|
117 | 117 | # define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP /* nothing */
|
118 | 118 |
|
119 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_4 1 |
120 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE /* nothing */ |
121 |
| - |
122 | 119 | #elif defined(__APPLE__)
|
123 | 120 |
|
124 | 121 | // clang-format off
|
|
219 | 216 | __attribute__((availability(driverkit, strict, introduced = 21.3)))
|
220 | 217 |
|
221 | 218 | // LLVM 11
|
222 |
| -# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \ |
223 |
| - (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \ |
224 |
| - (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) || \ |
225 |
| - (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000) |
| 219 | +# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) |
226 | 220 | # define _LIBCPP_INTRODUCED_IN_LLVM_11 0
|
227 | 221 | # else
|
228 | 222 | # define _LIBCPP_INTRODUCED_IN_LLVM_11 1
|
229 | 223 | # endif
|
230 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE \ |
231 |
| - __attribute__((availability(macos, strict, introduced = 11.0))) \ |
232 |
| - __attribute__((availability(ios, strict, introduced = 14.0))) \ |
233 |
| - __attribute__((availability(tvos, strict, introduced = 14.0))) \ |
234 |
| - __attribute__((availability(watchos, strict, introduced = 7.0))) |
| 224 | +# define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE __attribute__((availability(macos, strict, introduced = 11.0))) |
235 | 225 |
|
236 | 226 | // LLVM 9
|
237 |
| -# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) || \ |
238 |
| - (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \ |
239 |
| - (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) || \ |
240 |
| - (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000) |
| 227 | +# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101500) |
241 | 228 | # define _LIBCPP_INTRODUCED_IN_LLVM_9 0
|
242 | 229 | # else
|
243 | 230 | # define _LIBCPP_INTRODUCED_IN_LLVM_9 1
|
244 | 231 | # endif
|
245 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE \ |
246 |
| - __attribute__((availability(macos, strict, introduced = 10.15))) \ |
247 |
| - __attribute__((availability(ios, strict, introduced = 13.0))) \ |
248 |
| - __attribute__((availability(tvos, strict, introduced = 13.0))) \ |
249 |
| - __attribute__((availability(watchos, strict, introduced = 6.0))) |
250 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH \ |
251 |
| - _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \ |
252 |
| - _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ |
253 |
| - _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ |
254 |
| - _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))") |
255 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP \ |
256 |
| - _Pragma("clang attribute pop") \ |
257 |
| - _Pragma("clang attribute pop") \ |
258 |
| - _Pragma("clang attribute pop") \ |
259 |
| - _Pragma("clang attribute pop") |
260 |
| - |
261 |
| -// LLVM 4 |
262 |
| -# if defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000 |
263 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_4 0 |
264 |
| -# else |
265 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_4 1 |
266 |
| -# endif |
267 |
| -# define _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE __attribute__((availability(watchos, strict, introduced = 5.0))) |
| 232 | +# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE __attribute__((availability(macos, strict, introduced = 10.15))) |
| 233 | +# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_PUSH \ |
| 234 | + _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") |
| 235 | +# define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE_POP _Pragma("clang attribute pop") |
268 | 236 |
|
269 | 237 | // clang-format on
|
270 | 238 |
|
|
277 | 245 |
|
278 | 246 | #endif
|
279 | 247 |
|
280 |
| -// These macros control the availability of std::bad_optional_access and |
281 |
| -// other exception types. These were put in the shared library to prevent |
282 |
| -// code bloat from every user program defining the vtable for these exception |
283 |
| -// types. |
284 |
| -// |
285 |
| -// Note that when exceptions are disabled, the methods that normally throw |
286 |
| -// these exceptions can be used even on older deployment targets, but those |
287 |
| -// methods will abort instead of throwing. |
288 |
| -#define _LIBCPP_AVAILABILITY_HAS_BAD_OPTIONAL_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4 |
289 |
| -#define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE |
290 |
| - |
291 |
| -#define _LIBCPP_AVAILABILITY_HAS_BAD_VARIANT_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4 |
292 |
| -#define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE |
293 |
| - |
294 |
| -#define _LIBCPP_AVAILABILITY_HAS_BAD_ANY_CAST _LIBCPP_INTRODUCED_IN_LLVM_4 |
295 |
| -#define _LIBCPP_AVAILABILITY_BAD_ANY_CAST _LIBCPP_INTRODUCED_IN_LLVM_4_ATTRIBUTE |
296 |
| - |
297 | 248 | // These macros control the availability of all parts of <filesystem> that
|
298 | 249 | // depend on something in the dylib.
|
299 | 250 | #define _LIBCPP_AVAILABILITY_HAS_FILESYSTEM_LIBRARY _LIBCPP_INTRODUCED_IN_LLVM_9
|
|
383 | 334 | #define _LIBCPP_AVAILABILITY_HAS_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE _LIBCPP_INTRODUCED_IN_LLVM_21
|
384 | 335 | // No attribute, since we've had bad_function_call::what() in the headers before
|
385 | 336 |
|
386 |
| -// Define availability attributes that depend on _LIBCPP_HAS_EXCEPTIONS. |
387 |
| -// Those are defined in terms of the availability attributes above, and |
388 |
| -// should not be vendor-specific. |
389 |
| -#if !_LIBCPP_HAS_EXCEPTIONS |
390 |
| -# define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST |
391 |
| -# define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS |
392 |
| -# define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS |
393 |
| -#else |
394 |
| -# define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST _LIBCPP_AVAILABILITY_BAD_ANY_CAST |
395 |
| -# define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS |
396 |
| -# define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS |
397 |
| -#endif |
398 |
| - |
399 | 337 | // Define availability attributes that depend on both
|
400 | 338 | // _LIBCPP_HAS_EXCEPTIONS and _LIBCPP_HAS_RTTI.
|
401 | 339 | #if !_LIBCPP_HAS_EXCEPTIONS || !_LIBCPP_HAS_RTTI
|
|
0 commit comments