File tree 24 files changed +43
-87
lines changed
SymbolGraph/Symbols/Mixins/DeclarationFragments/Full
24 files changed +43
-87
lines changed Original file line number Diff line number Diff line change 1
1
// REQUIRES: objc_interop
2
2
// RUN: %empty-directory(%t)
3
3
// RUN: mkdir -p %t/tmp
4
- // RUN: %target-swiftc_driver -emit-module -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
4
+ // RUN: %target-swiftc_driver -emit-module -disable-bridging-pch - import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
5
5
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
6
6
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h
7
7
Original file line number Diff line number Diff line change 1
1
// REQUIRES: objc_interop
2
2
// RUN: %empty-directory(%t)
3
3
// RUN: mkdir -p %t/tmp
4
- // RUN: %target-swiftc_driver -emit-module -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
4
+ // RUN: %target-swiftc_driver -emit-module -disable-bridging-pch - import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
5
5
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
6
6
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h
7
7
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
- // RUN: %target-build-swift -emit-module -import-objc-header %S/Inputs/pch-bridging-header-with-another-bridging-header/app.h -I %S/Inputs/pch-bridging-header-with-another-bridging-header -module-name App -emit-module-path %t/App.swiftmodule %S/../Inputs/empty.swift
2
+ // RUN: %target-build-swift -emit-module -disable-bridging-pch - import-objc-header %S/Inputs/pch-bridging-header-with-another-bridging-header/app.h -I %S/Inputs/pch-bridging-header-with-another-bridging-header -module-name App -emit-module-path %t/App.swiftmodule %S/../Inputs/empty.swift
3
3
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
4
4
5
5
// CHECK: IMPORTED_HEADER{{.*}}Inputs/pch-bridging-header-with-another-bridging-header/app.h
18
18
19
19
import App
20
20
21
- _ = app_function ( 2 )
21
+ _ = app_function ( 2 )
Original file line number Diff line number Diff line change 7
7
// RUN: %target-typecheck-verify-swift -import-objc-header %t/sdk-bridging-header.pch
8
8
9
9
// Now test the driver-automated version is inert when disabled
10
- // RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -disable-bridging-pch -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
10
+ // Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
11
+ // RUN: env TMPDIR=%t/tmp/ SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -typecheck -disable-bridging-pch -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
11
12
// RUN: not ls %t/tmp/*.pch >/dev/null 2>&1
12
13
13
14
// Test the driver-automated version works by default
14
- // RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
15
+ // Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
16
+ // RUN: env TMPDIR=%t/tmp/ SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -typecheck -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
15
17
// RUN: ls %t/tmp/*.pch >/dev/null 2>&1
16
18
// RUN: llvm-objdump --raw-clang-ast %t/tmp/*.pch | llvm-bcanalyzer -dump | %FileCheck %s
17
19
// CHECK: ORIGINAL_FILE{{.*}}Inputs/sdk-bridging-header.h
Original file line number Diff line number Diff line change 4
4
// RUN: %empty-directory(%t)
5
5
6
6
// RUN: cp %S/Inputs/serialized-objc-header.h %t
7
- // RUN: %target-build-swift -emit-executable %S/ASTSection.swift -g -o %t/ASTSection-with-ObjC -import-objc-header %t/serialized-objc-header.h -DOBJC -module-name ASTSection -emit-module
7
+ // RUN: %target-build-swift -disable-bridging-pch - emit-executable %S/ASTSection.swift -g -o %t/ASTSection-with-ObjC -import-objc-header %t/serialized-objc-header.h -DOBJC -module-name ASTSection -emit-module
8
8
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection-with-ObjC | %FileCheck %s
9
9
10
10
// RUN: rm %t/serialized-objc-header.h
Original file line number Diff line number Diff line change 6
6
// RUN: mkdir -p %t
7
7
// RUN: cd %t
8
8
// RUN: cp %s .
9
- // RUN: %target-swiftc_driver -g \
9
+ // Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
10
+ // RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \
10
11
// RUN: -c -file-compilation-dir /path/to \
11
12
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL %s
12
- // RUN: %target-swiftc_driver -g \
13
+ // RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \
13
14
// RUN: -c -file-compilation-dir . \
14
15
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL-CWD %s
15
16
Original file line number Diff line number Diff line change 1
1
// Tests lookup and mangling of local types
2
2
3
+ // Avoid emitting the module separately since that would skip non-inlinable
4
+ // function bodies without types, and we want to print the decls in
5
+ // `singleDefaultArgument`.
3
6
// RUN: %empty-directory(%t)
4
- // RUN: %target-swiftc_driver -v -emit-module -module-name LocalTypes -o %t/LocalTypes.swiftmodule %s
7
+ // RUN: %target-swiftc_driver -v -no-emit-module-separately - emit-module -module-name LocalTypes -o %t/LocalTypes.swiftmodule %s
5
8
// RUN: %target-swift-ide-test -print-local-types -I %t -module-to-print LocalTypes -source-filename %s > %t.dump
6
9
// RUN: %FileCheck %s < %t.dump
7
10
// RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.dump
Original file line number Diff line number Diff line change 3
3
// RUN: %empty-directory(%t)
4
4
5
5
// Create separate modules and merge them together
6
- // RUN: %target-swiftc_driver -v -emit-module -module-name LocalTypesMerged -o %t/LocalTypesMerged.swiftmodule %s %S/local_types.swift
6
+ // RUN: %target-swiftc_driver -v -no-emit-module-separately - emit-module -module-name LocalTypesMerged -o %t/LocalTypesMerged.swiftmodule %s %S/local_types.swift
7
7
8
8
// RUN: %target-swift-ide-test -print-local-types -I %t -module-to-print LocalTypesMerged -source-filename %s | %FileCheck %s -allow-deprecated-dag-overlap
9
9
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
// Check that a failed process-tree emits nonzero failure counters
2
2
// RUN: %empty-directory(%t)
3
3
// RUN: echo zzz >%t/other.swift
4
- // RUN: not %target-swiftc_driver -continue-building-after-errors -D BROKEN -j 2 -typecheck -stats-output-dir %t %s %t/other.swift
4
+ // RUN: not env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -continue-building-after-errors -D BROKEN -j 2 -typecheck -stats-output-dir %t %s %t/other.swift
5
5
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/stats.csv %t
6
6
// RUN: %FileCheck -input-file %t/stats.csv -check-prefix=FAILURE %s
7
7
// FAILURE: {{"Driver.NumProcessFailures" 1$}}
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
2
// RUN: touch %t/main.swift
3
- // RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift
3
+ // RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift
4
4
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/frontend.csv %t
5
5
// RUN: %FileCheck -input-file %t/frontend.csv %s
6
6
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
2
3
3
// Generate the parseable interface of the current file via the merge-modules step
4
- // RUN: %target-build-swift -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/TestMerge.swiftinterface -module-name Test %s
4
+ // RUN: %target-build-swift -no-emit-module-separately - emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/TestMerge.swiftinterface -module-name Test %s
5
5
6
6
// Generate the parseable interface of the current file via a single frontend invocation
7
7
// RUN: %target-swift-frontend -typecheck -enable-objc-interop -emit-module-interface-path %t/TestSingle.swiftinterface -module-name Test %s
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
- // RUN: %target-build-swift -emit-module-interface-path %t/Lib.swiftinterface -emit-module -o %t/unused.swiftmodule -enable-library-evolution -Xfrontend -enable-objc-interop -Xfrontend -disable-objc-attr-requires-foundation-module -swift-version 5 %S/Inputs/enums-layout-helper.swift -module-name Lib
2
+ // RUN: %target-build-swift -no-emit-module-separately - emit-module-interface-path %t/Lib.swiftinterface -emit-module -o %t/unused.swiftmodule -enable-library-evolution -Xfrontend -enable-objc-interop -Xfrontend -disable-objc-attr-requires-foundation-module -swift-version 5 %S/Inputs/enums-layout-helper.swift -module-name Lib
3
3
// RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-MULTI-FILE %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface
4
4
// RUN: %target-swift-frontend -enable-objc-interop -compile-module-from-interface %t/Lib.swiftinterface -o %t/compiled-from-interface.swiftmodule -module-name Lib
5
5
// RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s
Original file line number Diff line number Diff line change 51
51
// RUN: rm -rf %t/Bar.package.swiftinterface
52
52
53
53
/// Print -package-name in public or private interface.
54
- // RUN: %target-build-swift -emit-module %t/Bar.swift -I %t \
54
+ /// Note the order of arguments differs across old/new driver, so force old
55
+ /// driver for now.
56
+ // RUN: env SWIFT_USE_OLD_DRIVER=1 %target-build-swift \
57
+ // RUN: -emit-module %t/Bar.swift -I %t \
55
58
// RUN: -module-name Bar -package-name barpkg \
56
59
// RUN: -enable-library-evolution -swift-version 6 \
57
60
// RUN: -Xfrontend -print-package-name-in-non-package-interface \
Original file line number Diff line number Diff line change 3
3
// RUN: %target-build-swift -O -wmo -Xfrontend -enable-default-cmo -parse-as-library -emit-module -emit-module-path=%t/Module.swiftmodule -module-name=Module -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/module.o
4
4
// RUN: %target-build-swift -O -wmo -Xfrontend -enable-default-cmo -parse-as-library -emit-tbd -emit-tbd-path %t/ModuleTBD.tbd -emit-module -emit-module-path=%t/ModuleTBD.swiftmodule -module-name=ModuleTBD -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/moduletbd.o -Xfrontend -tbd-install_name -Xfrontend module
5
5
6
- // RUN: %target-build-swift -O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil -o %t/Main.sil
6
+ // RUN: %target-build-swift -Xfrontend -enable-default-cmo - O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil -o %t/Main.sil
7
7
// RUN: %FileCheck %s < %t/Main.sil
8
8
9
9
// REQUIRES: swift_in_compiler
@@ -12,7 +12,7 @@ import Module
12
12
import ModuleTBD
13
13
14
14
// static ModuleStruct.privateFunctionPointer
15
- // CHECK-LABEL: sil_global public_external @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
15
+ // CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
16
16
17
17
// static ModuleStruct.publicFunctionPointer
18
18
// CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV21publicFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int
Original file line number Diff line number Diff line change 5
5
// RUN: %target-build-swift -O -wmo -Xfrontend -enable-default-cmo -parse-as-library -emit-module -emit-module-path=%t/Module.swiftmodule -module-name=Module -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/module.o
6
6
// RUN: %target-build-swift -O -wmo -Xfrontend -enable-default-cmo -parse-as-library -emit-tbd -emit-tbd-path %t/ModuleTBD.tbd -emit-module -emit-module-path=%t/ModuleTBD.swiftmodule -module-name=ModuleTBD -package-name Pkg -I%t -I%S/Inputs/cross-module %S/Inputs/cross-module/default-module.swift -c -o %t/moduletbd.o -Xfrontend -tbd-install_name -Xfrontend module
7
7
8
- // RUN: %target-build-swift -O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil | %FileCheck %s
8
+ // RUN: %target-build-swift -Xfrontend -enable-default-cmo - O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil | %FileCheck %s
9
9
10
10
// REQUIRES: swift_in_compiler
11
11
12
12
import Module
13
13
import ModuleTBD
14
14
15
- // CHECK-LABEL: sil_global public_external @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
15
+ // CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}}
16
16
17
17
public func callPublicFunctionPointer( _ x: Int ) -> Int {
18
18
return Module . ModuleStruct. publicFunctionPointer ( x)
Original file line number Diff line number Diff line change 4
4
// RUN: %empty-directory(%t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule)
5
5
// RUN: %target-swift-frontend -emit-module -o %t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule/%target-swiftmodule-name %S/Inputs/alias.swift -module-name has_alias
6
6
7
- // RUN: cd %t/secret && %target-swiftc_driver -emit-module -o %t/has_xref.swiftmodule -I . -F ../Frameworks -parse-as-library %S/Inputs/has_xref.swift %S/../Inputs/empty.swift -Xfrontend -serialize-debugging-options -Xcc -ivfsoverlay -Xcc %S/../Inputs/unextended-module-overlay.yaml -Xcc -DDUMMY
7
+ // Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
8
+ // RUN: cd %t/secret && env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -emit-module -o %t/has_xref.swiftmodule -I . -F ../Frameworks -parse-as-library %S/Inputs/has_xref.swift %S/../Inputs/empty.swift -Xfrontend -serialize-debugging-options -Xcc -ivfsoverlay -Xcc %S/../Inputs/unextended-module-overlay.yaml -Xcc -DDUMMY
8
9
// RUN: %target-swift-frontend %s -typecheck -I %t
9
10
10
11
// Ensure that in Swift 6 mode we do not read out search paths, thus are no longer able to
Original file line number Diff line number Diff line change 6
6
// FIXME: We don't currently handle group info for multi-file builds,
7
7
// so just make sure we don't crash.
8
8
// RUN: %empty-directory(%t.multifrontend)
9
- // RUN: %target-build-swift -module-name MyModule -emit-module -emit-module-path %t.multifrontend/MyModule.swiftmodule -Xfrontend -group-info-path -Xfrontend %S/Inputs/group.json %S/Inputs/swift_mod.swift %S/Inputs/swift_mod_syn.swift
9
+ // RUN: %target-build-swift -module-name MyModule -emit-module -emit-module-path %t.multifrontend/MyModule.swiftmodule -no-emit-module-separately -Xfrontend -group-info-path -Xfrontend %S/Inputs/group.json %S/Inputs/swift_mod.swift %S/Inputs/swift_mod_syn.swift
10
10
// RUN: %sourcekitd-test -req=interface-gen -module MyModule -group-name A -- -I %t.multifrontend -target %target-triple | %FileCheck -check-prefix=EMPTY %s
11
11
12
12
// GROUPA: MyClass
Original file line number Diff line number Diff line change 4
4
// RUN: %FileCheck %s --input-file %t/SomeProtocol.symbols.json
5
5
// RUN: %FileCheck %s --input-file %t/SomeProtocol.symbols.json --check-prefix MULTI
6
6
7
+ // Note we use '-wmo' here to make sure the driver doesn't do merge-modules,
8
+ // which would result in printing the Type instead of TypeRepr, leading to
9
+ // inconsistency with the new driver. Once we switch to always using the new
10
+ // driver, we can remove it.
7
11
// RUN: %empty-directory(%t)
8
- // RUN: %target-build-swift %s -module-name SomeProtocol -emit-module -emit-module-path %t/SomeProtocol.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/
12
+ // RUN: %target-build-swift %s -module-name SomeProtocol -emit-module -wmo - emit-module-path %t/SomeProtocol.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/
9
13
// RUN: %validate-json %t/SomeProtocol.symbols.json %t/SomeProtocol.formatted.symbols.json
10
14
// RUN: %FileCheck %s --input-file %t/SomeProtocol.formatted.symbols.json
11
15
// RUN: %FileCheck %s --input-file %t/SomeProtocol.formatted.symbols.json --check-prefix MULTI
@@ -19,7 +23,7 @@ public func doSomething(with param: some SomeProtocol) {}
19
23
20
24
public protocol OtherProtocol { }
21
25
22
- public func doSomethingElse( with param: some SomeProtocol & OtherProtocol ) { }
26
+ public func doSomethingElse( with param: some OtherProtocol & SomeProtocol ) { }
23
27
24
28
// CHECK-LABEL: "precise": "s:12SomeProtocol11doSomething4withyx_tA2ARzlF",
25
29
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
- // RUN: %target-build-swift -emit-module -c %S/Inputs/OpenHelpers.swift -o %t/OpenHelpers.swiftmodule
2
+ // RUN: %target-build-swift -emit-module %S/Inputs/OpenHelpers.swift -o %t/OpenHelpers.swiftmodule
3
3
// RUN: %target-typecheck-verify-swift -I %t
4
4
5
5
import OpenHelpers
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
2
3
- // RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main
3
+ // RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -disable-bridging-pch - import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main
4
4
// RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s
5
5
6
- // RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main -whole-module-optimization
6
+ // RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -disable-bridging-pch - import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main -whole-module-optimization
7
7
// RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s
8
8
9
9
// REQUIRES: objc_interop
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
- // RUN: %target-build-swift %s -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule
2
+ // FIXME: Crashes with PCH (https://github.com/swiftlang/swift/issues/76641)
3
+ // RUN: %target-build-swift %s -disable-bridging-pch -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule
3
4
// RUN: %target-swift-ide-test -print-module -module-to-print=Library -source-filename=x -I %S/Inputs/ -I %t | %FileCheck %s
4
5
5
6
// REQUIRES: objc_interop
You can’t perform that action at this time.
0 commit comments