Skip to content

Commit 9ba0647

Browse files
authored
Merge pull request #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

test/Index/Store/unit-pcm-dependency.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ func test() {
5050
// FILE1-NOT: ClangModuleA.h
5151
// FILE1-NOT: Unit |{{.*}}ClangModuleA
5252
// FILE1: Unit | system | Swift | {{.*}}Swift.swiftmodule
53+
// FILE1: Unit | system | _Concurrency
5354
// FILE1-NOT: Unit |{{.*}}ClangModuleA
5455
// FILE1: Unit | user | ClangModuleB | {{.*}}ClangModuleB-{{[A-Z0-9]*}}.pcm | ClangModuleB-{{[A-Z0-9]*}}.pcm-
5556
// FILE1: Unit | user | ClangModuleC | {{.*}}ClangModuleC-{{[A-Z0-9]*}}.pcm | ClangModuleC-{{[A-Z0-9]*}}.pcm-
5657
// FILE1-NOT: Unit |{{.*}}ClangModuleA
5758
// FILE1: Record | user | {{.*}}unit-pcm-dependency.swift | unit-pcm-dependency.swift-
5859
// FILE1-NOT: Unit |{{.*}}ClangModuleA
59-
// FILE1: DEPEND END (4)
60+
// FILE1: DEPEND END (5)
6061

6162
// FILE2-NOT: main.swiftmodule-
6263

test/Index/Store/unit-with-bridging-header.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@
3232
// PCH-UNIT: DEPEND START
3333
// PCH-UNIT: Unit | system | {{.*}}Swift.swiftmodule
3434
// PCH-UNIT: Unit | user | {{.*}}bridge-head.pch | bridge-head.pch-
35+
// PCH-UNIT: Unit | system | _Concurrency |
3536
// PCH-UNIT: Record | user | {{.*}}unit-with-bridging-header.swift | unit-with-bridging-header.swift-
36-
// PCH-UNIT: DEPEND END (3)
37+
// PCH-UNIT: DEPEND END (4)
3738

3839
// TEXTUAL-UNIT: s1.o-
3940
// TEXTUAL-UNIT: --------
4041
// TEXTUAL-UNIT: has-main: 1
4142
// TEXTUAL-UNIT: DEPEND START
4243
// TEXTUAL-UNIT: Unit | system | {{.*}}Swift.swiftmodule
4344
// TEXTUAL-UNIT: Record | user | {{.*}}unit-with-bridging-header.swift | unit-with-bridging-header.swift-
44-
// TEXTUAL-UNIT: DEPEND END (2)
45+
// TEXTUAL-UNIT: DEPEND END (3)
4546

4647
func test() {}

test/Interpreter/fractal.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-build-swift -emit-library -o %t/%target-library-name(complex) -emit-module %S/complex.swift -module-link-name complex
2+
// RUN: %target-build-swift -Xfrontend -disable-implicit-concurrency-module-import -emit-library -o %t/%target-library-name(complex) -emit-module %S/complex.swift -module-link-name complex
33
// RUN: %target-jit-run %s -I %t -L %t | %FileCheck %s
44

55
// RUN: grep -v import %s > %t/main.swift

test/Interpreter/mandelbrot.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-build-swift -emit-library -o %t/%target-library-name(complex) -emit-module %S/complex.swift -module-link-name complex
2+
// RUN: %target-build-swift -Xfrontend -disable-implicit-concurrency-module-import -emit-library -o %t/%target-library-name(complex) -emit-module %S/complex.swift -module-link-name complex
33
// RUN: %target-jit-run %s -I %t -L %t | %FileCheck %s
44

55
// RUN: grep -v import %s > %t/main.swift

test/ModuleInterface/ModuleCache/module-cache-diagnostics.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
2222
//
2323
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
24-
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
24+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
2525
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
26-
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
26+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
2727
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
28-
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
28+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
2929
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
3030
//
3131
//
@@ -38,7 +38,7 @@
3838
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
3939
// RUN: %{python} %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
4040
// RUN: rm %t/TestModule.swiftmodule
41-
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s 2>&1 | sed '/WARNING: TRYING Scope exclusively/d' >%t/warn.txt
41+
// RUN: %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s 2>&1 | sed '/WARNING: TRYING Scope exclusively/d' >%t/warn.txt
4242
// RUN: %{python} %S/Inputs/check-is-new.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
4343
// "check warn.txt exists and is empty"
4444
// RUN: test -e %t/warn.txt -a ! -s %t/warn.txt
@@ -53,7 +53,7 @@
5353
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
5454
// RUN: %{python} %S/Inputs/check-is-old.py %t/LeafModule.swiftinterface
5555
// RUN: rm %t/TestModule.swiftmodule
56-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err.txt 2>&1
56+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err.txt 2>&1
5757
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
5858
// RUN: %FileCheck %s -check-prefix=CHECK-ERROR <%t/err.txt
5959
// CHECK-ERROR: LeafModule.swiftinterface:7:8: error: no such module 'NotAModule'
@@ -66,7 +66,7 @@
6666
//
6767
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
6868
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
69-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
69+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
7070
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
7171
// RUN: c-index-test -read-diagnostics %t/err.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-ERROR
7272
//
@@ -78,7 +78,7 @@
7878
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
7979
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
8080
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
81-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err-inline.txt 2>&1
81+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err-inline.txt 2>&1
8282
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
8383
// RUN: %FileCheck %s -check-prefix=CHECK-ERROR-INLINE <%t/err-inline.txt
8484
// CHECK-ERROR-INLINE: LeafModule.swiftinterface:6:33: error: cannot find 'unresolved' in scope
@@ -91,7 +91,7 @@
9191
//
9292
// RUN: %{python} %S/Inputs/check-is-old.py %t/OtherModule.swiftinterface %t/LeafModule.swiftinterface
9393
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
94-
// RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err-inline.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
94+
// RUN: not %target-swift-frontend -disable-implicit-concurrency-module-import -I %t -module-cache-path %t/modulecache -serialize-diagnostics -serialize-diagnostics-path %t/err-inline.dia -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
9595
// RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
9696
// RUN: c-index-test -read-diagnostics %t/err-inline.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-ERROR-INLINE
9797

test/ModuleInterface/imports-submodule-order.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
// CHECK-NEXT: {{^}}import Swift{{$}}
2121
// CHECK-NEXT: import X{{$}}
2222
// CHECK-NEXT: import Y{{$}}
23+
// CHECK-NEXT: {{^}}import _Concurrency{{$}}
2324
// CHECK-NOT: import

test/ModuleInterface/imports.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import NotSoSecret2 // expected-warning {{'NotSoSecret2' inconsistently imported
2424
// CHECK-NEXT: {{^}}import NotSoSecret{{$}}
2525
// CHECK-NEXT: {{^}}import NotSoSecret2{{$}}
2626
// CHECK-NEXT: {{^}}import Swift{{$}}
27+
// CHECK-NEXT: {{^}}import _Concurrency{{$}}
2728
// CHECK-NEXT: {{^}}@_exported import empty{{$}}
2829
// CHECK-NEXT: {{^}}@_exported import emptyButWithLibraryEvolution{{$}}
2930
// CHECK-NOT: import

test/ScanDependencies/can_import_placeholder.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ import SomeExternalModule
4040
// CHECK-NEXT: }
4141
// CHECK-NEXT: {
4242
// CHECK-NEXT: "swift": "SwiftOnoneSupport"
43+
// CHECK-NEXT: },
44+
// CHECK-NEXT: {
45+
// CHECK-NEXT: "swift": "_Concurrency"
4346
// CHECK-NEXT: }
4447
// CHECK-NEXT: ],
4548

test/ScanDependencies/can_import_with_map.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
2121
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
2222
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
23+
// RUN: echo "}," >> %/t/inputs/map.json
24+
// RUN: echo "{" >> %/t/inputs/map.json
25+
// RUN: echo "\"moduleName\": \"_Concurrency\"," >> %/t/inputs/map.json
26+
// RUN: echo "\"modulePath\": \"%/concurrency_module\"," >> %/t/inputs/map.json
27+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
2328
// RUN: echo "}]" >> %/t/inputs/map.json
2429

2530
// RUN: %target-swift-frontend -typecheck %s -explicit-swift-module-map-file %t/inputs/map.json -disable-implicit-swift-modules

test/ScanDependencies/explicit-framework-irgen.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
2222
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
2323
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
24+
// RUN: echo "}," >> %/t/inputs/map.json
25+
// RUN: echo "{" >> %/t/inputs/map.json
26+
// RUN: echo "\"moduleName\": \"_Concurrency\"," >> %/t/inputs/map.json
27+
// RUN: echo "\"modulePath\": \"%/concurrency_module\"," >> %/t/inputs/map.json
28+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
2429
// RUN: echo "}]" >> %/t/inputs/map.json
2530

2631
// RUN: %target-swift-frontend -emit-object -emit-module -disable-implicit-swift-modules -explicit-swift-module-map-file %t/inputs/map.json -o %t/explicit-framework-irgen.o %s

test/ScanDependencies/explicit-module-map-forwarding-module.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
3131
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
3232
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
33+
// RUN: echo "}," >> %/t/inputs/map.json
34+
// RUN: echo "{" >> %/t/inputs/map.json
35+
// RUN: echo "\"moduleName\": \"_Concurrency\"," >> %/t/inputs/map.json
36+
// RUN: echo "\"modulePath\": \"%/concurrency_module\"," >> %/t/inputs/map.json
37+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
3338
// RUN: echo "}]" >> %/t/inputs/map.json
3439

3540
// RUN: %target-swift-ide-test -print-module-comments -module-to-print=Foo -enable-swiftsourceinfo -source-filename %s -explicit-swift-module-map-file %t/inputs/map.json | %FileCheck %s

test/ScanDependencies/explicit-module-map.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
// RUN: echo "\"moduleName\": \"SwiftOnoneSupport\"," >> %/t/inputs/map.json
2222
// RUN: echo "\"modulePath\": \"%/ononesupport_module\"," >> %/t/inputs/map.json
2323
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
24+
// RUN: echo "}," >> %/t/inputs/map.json
25+
// RUN: echo "{" >> %/t/inputs/map.json
26+
// RUN: echo "\"moduleName\": \"_Concurrency\"," >> %/t/inputs/map.json
27+
// RUN: echo "\"modulePath\": \"%/concurrency_module\"," >> %/t/inputs/map.json
28+
// RUN: echo "\"isFramework\": false" >> %/t/inputs/map.json
2429
// RUN: echo "}]" >> %/t/inputs/map.json
2530

2631
// RUN: %target-swift-ide-test -print-module-comments -module-to-print=Foo -enable-swiftsourceinfo -source-filename %s -explicit-swift-module-map-file %t/inputs/map.json | %FileCheck %s

test/ScanDependencies/module_deps.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ import SubE
6161
// CHECK-NEXT: "swift": "SwiftOnoneSupport"
6262
// CHECK-NEXT: },
6363
// CHECK-NEXT: {
64+
// CHECK-NEXT: "swift": "_Concurrency"
65+
// CHECK-NEXT: },
66+
// CHECK-NEXT: {
6467
// CHECK-NEXT: "swift": "_cross_import_E"
6568
// CHECK-NEXT: }
6669
// CHECK-NEXT: ],

test/ScanDependencies/module_deps_cross_import_overlay.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ import SubEWrapper
2828
// CHECK-NEXT: "swift": "SwiftOnoneSupport"
2929
// CHECK-NEXT: },
3030
// CHECK-NEXT: {
31+
// CHECK-NEXT: "swift": "_Concurrency"
32+
// CHECK-NEXT: },
33+
// CHECK-NEXT: {
3134
// CHECK-NEXT: "swift": "_cross_import_E"
3235
// CHECK-NEXT: }
3336
// CHECK-NEXT: ],

test/ScanDependencies/module_deps_external.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ import SomeExternalModule
5050
// CHECK-NEXT: }
5151
// CHECK-NEXT: {
5252
// CHECK-NEXT: "swift": "SwiftOnoneSupport"
53+
// CHECK-NEXT: },
54+
// CHECK-NEXT: {
55+
// CHECK-NEXT: "swift": "_Concurrency"
5356
// CHECK-NEXT: }
5457
// CHECK-NEXT: ],
5558

test/ScanDependencies/module_framework.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ import CryptoKit
1717
// CHECK-NEXT: }
1818
// CHECK-NEXT: {
1919
// CHECK-NEXT: "swift": "SwiftOnoneSupport"
20+
// CHECK-NEXT: },
21+
// CHECK-NEXT: {
22+
// CHECK-NEXT: "swift": "_Concurrency"
2023
// CHECK-NEXT: }
2124
// CHECK-NEXT: ],
2225

test/ScanDependencies/prescan_deps.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ import SubE
1919
// CHECK-NEXT: "G",
2020
// CHECK-NEXT: "SubE",
2121
// CHECK-NEXT: "Swift",
22-
// CHECK-NEXT: "SwiftOnoneSupport"
22+
// CHECK-NEXT: "SwiftOnoneSupport",
23+
// CHECK-NEXT: "_Concurrency"
2324
// CHECK-NEXT: ]

0 commit comments

Comments
 (0)