Skip to content

Commit e0e51a0

Browse files
committed
Also add LLVM 20 availability
1 parent 86f44ef commit e0e51a0

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

libcxx/include/__configuration/availability.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,23 @@
118118
# define _LIBCPP_INTRODUCED_IN_LLVM_21_ATTRIBUTE __attribute__((unavailable))
119119

120120
// LLVM 20
121-
// TODO: Fill this in
122-
# define _LIBCPP_INTRODUCED_IN_LLVM_20 0
123-
# define _LIBCPP_INTRODUCED_IN_LLVM_20_ATTRIBUTE __attribute__((unavailable))
121+
//
122+
// Note that versions for most Apple OSes were bumped forward and aligned in that release.
123+
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 260000) || \
124+
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 260000) || \
125+
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 260000) || \
126+
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 260000) || \
127+
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 100000)
128+
# define _LIBCPP_INTRODUCED_IN_LLVM_20 0
129+
# else
130+
# define _LIBCPP_INTRODUCED_IN_LLVM_20 1
131+
# endif
132+
# define _LIBCPP_INTRODUCED_IN_LLVM_20_ATTRIBUTE \
133+
__attribute__((availability(macos, strict, introduced = 26.0))) \
134+
__attribute__((availability(ios, strict, introduced = 26.0))) \
135+
__attribute__((availability(tvos, strict, introduced = 26.0))) \
136+
__attribute__((availability(watchos, strict, introduced = 26.0))) \
137+
__attribute__((availability(bridgeos, strict, introduced = 10.0)))
124138

125139
// LLVM 19
126140
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 150400) || \

libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88

99
// UNSUPPORTED: no-exceptions
1010

11-
// After changing the alignment of the allocated pointer from 16 to 8, the exception
12-
// thrown is no longer `bad_alloc` but instead length_error on systems using new
13-
// headers but a dylib that doesn't contain 04ce0ba.
14-
//
15-
// XFAIL: using-built-library-before-llvm-19
16-
1711
// <string>
1812

1913
// size_type max_size() const; // constexpr since C++20

libcxx/utils/libcxx/test/features.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,13 @@ def check_gdb(cfg):
733733
# Helpers to define correspondances between LLVM versions and vendor system versions.
734734
# Those are used for backdeployment features below, do not use directly in tests.
735735
DEFAULT_FEATURES += [
736+
Feature(
737+
name="_target-has-llvm-20",
738+
when=lambda cfg: BooleanExpression.evaluate(
739+
"_target-has-llvm-21 || target={{.+}}-apple-macosx26.{{\d+(.\d+)?}}",
740+
cfg.available_features,
741+
),
742+
),
736743
Feature(
737744
name="_target-has-llvm-19",
738745
when=lambda cfg: BooleanExpression.evaluate(

libcxxabi/test/test_demangle.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
// dd8b266ef.
1414
// UNSUPPORTED: using-built-library-before-llvm-20
1515

16+
// This test exercises support for BitInt demangling introduced in
17+
// 20f56d140909a01c74e9981835373eaab6021af9.
18+
// UNSUPPORTED: using-built-library-before-llvm-21
19+
1620
// XFAIL: win32-broken-printf-a-precision
1721

1822
#include "support/timer.h"

0 commit comments

Comments
 (0)