Skip to content

Commit ad63302

Browse files
committed
[Concurrency] Make Swift 6 available in noasserts compilers.
1 parent 8cc2a3b commit ad63302

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

include/swift/Basic/Version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ class Version {
134134

135135
// List of backward-compatibility versions that we permit passing as
136136
// -swift-version <vers>
137-
static std::array<StringRef, 3> getValidEffectiveVersions() {
138-
return {{"4", "4.2", "5"}};
137+
static std::array<StringRef, 4> getValidEffectiveVersions() {
138+
return {{"4", "4.2", "5", "6"}};
139139
};
140140
};
141141

lib/Basic/Version.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,7 @@ llvm::Optional<Version> Version::getEffectiveLanguageVersion() const {
180180
"getCurrentLanguageVersion is no longer correct here");
181181
return Version::getCurrentLanguageVersion();
182182
case 6:
183-
// Allow version '6' in asserts compilers *only* so that we can start
184-
// testing changes slated for Swift 6. Note that it's still not listed in
185-
// `Version::getValidEffectiveVersions()`.
186-
// FIXME: When Swift 6 becomes real, remove 'REQUIRES: asserts' from tests
187-
// using '-swift-version 6'.
188-
#ifdef NDEBUG
189-
LLVM_FALLTHROUGH;
190-
#else
191183
return Version{6};
192-
#endif
193184
default:
194185
return llvm::None;
195186
}

test/Driver/swift-version-6-asserts.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Tests temporary -swift-version 6 behavior in compilers with asserts enabled,
2-
// where we allow -swift-version 6 for testing but don't list it as a permitted
3-
// version.
4-
51
// REQUIRES: asserts
62

73
// RUN: not %target-swiftc_driver -swift-version 6 -typecheck %s 2>&1 | %FileCheck --check-prefix ERROR_6 %s
@@ -51,4 +47,4 @@ jkl
5147

5248
// ERROR_7: <unknown>:0: error: invalid value '7' in '-swift-version 7'
5349
// ERROR_7: <unknown>:0: note: valid arguments to '-swift-version'
54-
// ERROR_7-NOT: '6'
50+
// ERROR_7: valid arguments to '-swift-version' are '4', '4.2', '5', '6'

0 commit comments

Comments
 (0)