Skip to content

Commit af112c1

Browse files
committed
Update the Swift version to 6.0 from 5.11
1 parent e1fdb00 commit af112c1

File tree

75 files changed

+362
-362
lines changed

Some content is hidden

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

75 files changed

+362
-362
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/Demangling/DemangleNodes.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ NODE(AsyncSuspendResumePartialFunction)
358358
NODE(AccessibleFunctionRecord)
359359
NODE(CompileTimeConst)
360360

361-
// Added in Swift 5.11
361+
// Added in Swift 6.0
362362
NODE(AccessibleProtocolRequirementFunctionRecord)
363363

364364
// Added in Swift 5.7
@@ -376,7 +376,7 @@ NODE(HasSymbolQuery)
376376
NODE(OpaqueReturnTypeIndex)
377377
NODE(OpaqueReturnTypeParent)
378378

379-
// Addedn in Swift 5.11
379+
// Addedn in Swift 6.0
380380
NODE(OutlinedEnumTagStore)
381381
NODE(OutlinedEnumProjectDataForLoad)
382382
NODE(OutlinedEnumGetTag)

lib/Basic/Version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ llvm::Optional<Version> Version::getEffectiveLanguageVersion() const {
176176
assert(size() == 2 && Components[0] == 4 && Components[1] == 2);
177177
return Version{4, 2};
178178
case 5:
179-
static_assert(SWIFT_VERSION_MAJOR == 5,
179+
return Version{5};
180+
case 6:
181+
static_assert(SWIFT_VERSION_MAJOR == 6,
180182
"getCurrentLanguageVersion is no longer correct here");
181183
return Version::getCurrentLanguageVersion();
182-
case 6:
183-
return Version{6};
184184
default:
185185
return llvm::None;
186186
}

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 = llvm::None;
391391
} else {

lib/Frontend/CompilerInvocation.cpp

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

lib/IRGen/GenReflection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class PrintMetadataSource
176176

177177
llvm::Optional<llvm::VersionTuple>
178178
getRuntimeVersionThatSupportsDemanglingType(CanType type) {
179-
// The Swift 5.11 runtime is the first version able to demangle types
179+
// The Swift 6.0 runtime is the first version able to demangle types
180180
// that involve typed throws.
181181
bool usesTypedThrows = type.findIf([](CanType t) -> bool {
182182
if (auto fn = dyn_cast<AnyFunctionType>(t)) {
@@ -187,7 +187,7 @@ getRuntimeVersionThatSupportsDemanglingType(CanType type) {
187187
return false;
188188
});
189189
if (usesTypedThrows) {
190-
return llvm::VersionTuple(5, 11);
190+
return llvm::VersionTuple(6, 0);
191191
}
192192

193193
// The Swift 5.5 runtime is the first version able to demangle types

lib/Macros/Sources/SwiftMacros/DistributedProtocolMacro.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct DistributedProtocolMacro: ExtensionMacro, PeerMacro {
3737
.map { req in
3838
"""
3939
\(req) {
40-
if #available(SwiftStdlib 5.11, *) {
40+
if #available(SwiftStdlib 6.0, *) {
4141
Distributed._distributedStubFatalError()
4242
} else {
4343
fatalError()
@@ -76,7 +76,7 @@ public struct DistributedProtocolMacro: ExtensionMacro, PeerMacro {
7676
.map { req in
7777
"""
7878
\(req) {
79-
if #available(SwiftStdlib 5.11, *) {
79+
if #available(SwiftStdlib 6.0, *) {
8080
Distributed._distributedStubFatalError()
8181
} else {
8282
fatalError()

0 commit comments

Comments
 (0)