Skip to content

Commit c7c3eb2

Browse files
authored
Merge pull request #71707 from apple/bump-swift-version-to-6
Update the Swift version to 6.0!
2 parents c915e37 + cb96ec2 commit c7c3eb2

File tree

79 files changed

+365
-365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+365
-365
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> **Note**\
44
> This is in reverse chronological order, so newer entries are added to the top.
55
6-
## Swift 5.11
6+
## Swift 6.0
77
* [SE-0422][]:
88
Non-built-in expression macros can now be used as default arguments that
99
expand at each call site. For example, a custom `#CurrentFile` macro used as

cmake/SwiftVersion.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SWIFT_VERSION is deliberately /not/ cached so that an existing build directory
22
# can be reused when a new version of Swift comes out (assuming the user hasn't
33
# manually set it as part of their own CMake configuration).
4-
set(SWIFT_VERSION_MAJOR 5)
5-
set(SWIFT_VERSION_MINOR 11)
4+
set(SWIFT_VERSION_MAJOR 6)
5+
set(SWIFT_VERSION_MINOR 0)
66
set(SWIFT_VERSION "${SWIFT_VERSION_MAJOR}.${SWIFT_VERSION_MINOR}")
77

docs/ABI/Mangling.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ Types
656656
function-isolation ::= type 'Yc' // Global actor on function type
657657
#endif
658658
throws ::= 'K' // 'throws' annotation on function types
659-
#if SWIFT_RUNTIME_VERSION >= 5.11
659+
#if SWIFT_RUNTIME_VERSION >= 6.0
660660
throws ::= type 'YK' // 'throws(type)' annotation on function types
661661
function-isolation ::= type 'YA' // @isolated(any) on function type
662662
#endif

include/swift/AST/ASTContext.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,10 +990,10 @@ class ASTContext final {
990990
return getSwiftAvailability(5, 10);
991991
}
992992

993-
/// Get the runtime availability of features introduced in the Swift 5.11
993+
/// Get the runtime availability of features introduced in the Swift 6.0
994994
/// compiler for the target platform.
995-
inline AvailabilityContext getSwift511Availability() const {
996-
return getSwiftAvailability(5, 11);
995+
inline AvailabilityContext getSwift60Availability() const {
996+
return getSwiftAvailability(6, 0);
997997
}
998998

999999
/// Get the runtime availability for a particular version of Swift (5.0+).

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ namespace swift {
171171
///
172172

173173
/// User-overridable language version to compile for.
174-
version::Version EffectiveLanguageVersion = version::Version::getCurrentLanguageVersion();
174+
version::Version EffectiveLanguageVersion = version::Version{5, 10};
175175

176176
/// Swift runtime version to compile for.
177177
version::Version RuntimeVersion = version::Version::getCurrentLanguageVersion();

include/swift/Demangling/DemangleNodes.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ NODE(AsyncSuspendResumePartialFunction)
361361
NODE(AccessibleFunctionRecord)
362362
NODE(CompileTimeConst)
363363

364-
// Added in Swift 5.11
364+
// Added in Swift 6.0
365365
NODE(AccessibleProtocolRequirementFunctionRecord)
366366

367367
// Added in Swift 5.7
@@ -379,7 +379,7 @@ NODE(HasSymbolQuery)
379379
NODE(OpaqueReturnTypeIndex)
380380
NODE(OpaqueReturnTypeParent)
381381

382-
// Addedn in Swift 5.11
382+
// Addedn in Swift 6.0
383383
NODE(OutlinedEnumTagStore)
384384
NODE(OutlinedEnumProjectDataForLoad)
385385
NODE(OutlinedEnumGetTag)

include/swift/Runtime/CMakeConfig.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#cmakedefine01 SWIFT_BNI_OS_BUILD
88
#cmakedefine01 SWIFT_BNI_XCODE_BUILD
99

10-
#cmakedefine SWIFT_VERSION_MAJOR "@SWIFT_VERSION_MAJOR@"
11-
#cmakedefine SWIFT_VERSION_MINOR "@SWIFT_VERSION_MINOR@"
10+
#define SWIFT_VERSION_MAJOR "@SWIFT_VERSION_MAJOR@"
11+
#define SWIFT_VERSION_MINOR "@SWIFT_VERSION_MINOR@"
1212

1313
#endif

lib/Basic/Version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ std::optional<Version> Version::getEffectiveLanguageVersion() const {
175175
assert(size() == 2 && Components[0] == 4 && Components[1] == 2);
176176
return Version{4, 2};
177177
case 5:
178-
static_assert(SWIFT_VERSION_MAJOR == 5,
178+
return Version{5, 10};
179+
case 6:
180+
static_assert(SWIFT_VERSION_MAJOR == 6,
179181
"getCurrentLanguageVersion is no longer correct here");
180182
return Version::getCurrentLanguageVersion();
181-
case 6:
182-
return Version{6};
183183
default:
184184
return std::nullopt;
185185
}

lib/Driver/DarwinToolChains.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,8 @@ toolchains::Darwin::addArgsToLinkStdlib(ArgStringList &Arguments,
384384
runtimeCompatibilityVersion = llvm::VersionTuple(5, 6);
385385
} else if (value.equals("5.8")) {
386386
runtimeCompatibilityVersion = llvm::VersionTuple(5, 8);
387-
} else if (value.equals("5.11")) {
388-
runtimeCompatibilityVersion = llvm::VersionTuple(5, 11);
387+
} else if (value.equals("6.0")) {
388+
runtimeCompatibilityVersion = llvm::VersionTuple(6, 0);
389389
} else if (value.equals("none")) {
390390
runtimeCompatibilityVersion = std::nullopt;
391391
} else {

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2907,8 +2907,8 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
29072907
runtimeCompatibilityVersion = llvm::VersionTuple(5, 6);
29082908
} else if (version.equals("5.8")) {
29092909
runtimeCompatibilityVersion = llvm::VersionTuple(5, 8);
2910-
} else if (version.equals("5.11")) {
2911-
runtimeCompatibilityVersion = llvm::VersionTuple(5, 11);
2910+
} else if (version.equals("6.0")) {
2911+
runtimeCompatibilityVersion = llvm::VersionTuple(6, 0);
29122912
} else {
29132913
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
29142914
versionArg->getAsString(Args), version);

0 commit comments

Comments
 (0)