Skip to content

Commit 9ba0647

Browse files
authored
Merge pull request swiftlang#36767 from DougGregor/implicit-concurrency-import
2 parents 37097c1 + fb1e47d commit 9ba0647

File tree

62 files changed

+374
-254
lines changed

Some content is hidden

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

62 files changed

+374
-254
lines changed

lib/Frontend/Frontend.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,7 @@ CompilerInstance::openModuleDoc(const InputFile &input) {
754754
}
755755

756756
bool CompilerInvocation::shouldImportSwiftConcurrency() const {
757-
return getLangOptions().EnableExperimentalConcurrency
758-
&& !getLangOptions().DisableImplicitConcurrencyModuleImport &&
757+
return !getLangOptions().DisableImplicitConcurrencyModuleImport &&
759758
getFrontendOptions().InputMode !=
760759
FrontendOptions::ParseInputMode::SwiftModuleInterface;
761760
}

test/Concurrency/async_main_no_concurrency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -parse-as-library %s
1+
// RUN: %target-typecheck-verify-swift -parse-as-library -disable-implicit-concurrency-module-import %s
22
// RUN: %target-typecheck-verify-swift -parse-as-library -enable-experimental-concurrency -parse-stdlib %s
33

44
@main struct Main {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// swift-interface-format-version: 1.0
2+
// swift-module-flags: -target x86_64-unknown-linux-android -disable-objc-interop -swift-version 5 -O -module-name _Concurrency

test/IDE/Inputs/foo_swift_module.printed.comments.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import SwiftOnoneSupport
2+
import _Concurrency
23

34
func %%% (lhs: Int, rhs: Int) -> Int
45

test/IDE/complete_from_stdlib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
2+
// RUN: %target-swift-ide-test -disable-implicit-concurrency-module-import -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
33

44
// NO_STDLIB_PRIVATE: Begin completions
55
// NO_STDLIB_PRIVATE-NOT: Decl{{[^:]*}}/IsSystem: _

test/IDE/complete_override.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
2+
// RUN: %target-swift-ide-test -disable-implicit-concurrency-module-import -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
33
// RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift
44
// RUN: %target-swift-frontend -typecheck -verify -disable-objc-attr-requires-foundation-module -enable-objc-interop %t_no_errors.swift
55

test/IRGen/ELF-remove-autolink-section.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// RUN: %swiftc_driver -emit-ir %s -o - | %FileCheck %s -check-prefix ELF
1+
// RUN: %swiftc_driver -emit-ir %s -o - -Xfrontend -disable-implicit-concurrency-module-import | %FileCheck %s -check-prefix ELF
22

33
// Check that the swift auto link section is available in the object file.
4-
// RUN: %swiftc_driver -c %s -o %t
4+
// RUN: %swiftc_driver -c %s -o %t -Xfrontend -disable-implicit-concurrency-module-import
55
// RUN: llvm-readelf %t -S | %FileCheck %s -check-prefix SECTION
66

77
// Checks that the swift auto link section is removed from the final binary.
8-
// RUN: %swiftc_driver -emit-executable %s -o %t
8+
// RUN: %swiftc_driver -emit-executable %s -o %t -Xfrontend -disable-implicit-concurrency-module-import
99
// RUN: llvm-readelf %t -S | %FileCheck %s -check-prefix NOSECTION
1010

1111
// REQUIRES: OS=linux-gnu

test/Index/Store/cross-import-overlay.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ from__ABAdditionsCAdditions()
3030
// MAIN-NEXT: is-debug: 1
3131
// MAIN-NEXT: DEPEND START
3232
// MAIN-NEXT: Unit | system | Swift | {{.*}}{{/|\\}}Swift.swiftmodule
33+
// MAIN-NEXT: Unit | system | _Concurrency | {{.*}}{{/|\\}}_Concurrency.swiftmodule
3334
// MAIN-NEXT: Unit | system | B | {{.*}}{{/|\\}}B.swiftmodule{{/|\\}}{{.*}}
3435
// MAIN-NEXT: Unit | system | C | {{.*}}{{/|\\}}C.swiftmodule{{/|\\}}{{.*}}
3536
// MAIN-NEXT: Unit | system | A | {{.*}}{{/|\\}}__ABAdditionsCAdditions.swiftmodule{{/|\\}}{{.*}}

test/Index/Store/unit-from-compile.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
// CHECK: DEPEND START
1818
// CHECK: Unit | system | {{.*}}{{/|\\}}Swift.swiftmodule
19-
// CHECK: DEPEND END (1)
19+
// CHECK: Unit | system | _Concurrency
20+
// CHECK: DEPEND END (2)
2021

2122
// OPT: is-debug: 1

test/Index/Store/unit-one-file-multi-file-invocation.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
// CHECK: 00-output_for_index
99
// CHECK: DEPEND START
1010
// CHECK: Unit | system | Swift | [[MODULE:.*[/\\]Swift[.]swiftmodule([/\\].+[.]swiftmodule)?]] | [[SWIFT:.+[.]swiftmodule-[A-Z0-9]*]]
11+
// CHECK: Unit | system | _Concurrency | {{.*}}
1112
// CHECK: Record | user | {{.*}}{{/|\\}}unit-one-file-multi-file-invocation.swift |
12-
// CHECK: DEPEND END (2)
13+
// CHECK: DEPEND END (3)
1314

1415
// CHECK: [[SWIFT]]
1516
// CHECK: DEPEND START

0 commit comments

Comments
 (0)