diff --git a/test/ClangImporter/pch-bridging-header-unittest-ok.swift b/test/ClangImporter/pch-bridging-header-unittest-ok.swift index d68ff4322af6b..c0d6f5c352223 100644 --- a/test/ClangImporter/pch-bridging-header-unittest-ok.swift +++ b/test/ClangImporter/pch-bridging-header-unittest-ok.swift @@ -1,7 +1,7 @@ // REQUIRES: objc_interop // RUN: %empty-directory(%t) // RUN: mkdir -p %t/tmp -// 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 +// 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 // RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s // CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h diff --git a/test/ClangImporter/pch-bridging-header-unittest-warn.swift b/test/ClangImporter/pch-bridging-header-unittest-warn.swift index f630c30328238..00d281129ca3b 100644 --- a/test/ClangImporter/pch-bridging-header-unittest-warn.swift +++ b/test/ClangImporter/pch-bridging-header-unittest-warn.swift @@ -1,7 +1,7 @@ // REQUIRES: objc_interop // RUN: %empty-directory(%t) // RUN: mkdir -p %t/tmp -// 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 +// 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 // RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s // CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h diff --git a/test/ClangImporter/pch-bridging-header-with-another-bridging-header.swift b/test/ClangImporter/pch-bridging-header-with-another-bridging-header.swift index 63d232667208f..f66c3e9436d4b 100644 --- a/test/ClangImporter/pch-bridging-header-with-another-bridging-header.swift +++ b/test/ClangImporter/pch-bridging-header-with-another-bridging-header.swift @@ -1,5 +1,5 @@ // RUN: %empty-directory(%t) -// 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 +// 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 // RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s // CHECK: IMPORTED_HEADER{{.*}}Inputs/pch-bridging-header-with-another-bridging-header/app.h @@ -18,4 +18,4 @@ import App -_ = app_function(2) \ No newline at end of file +_ = app_function(2) diff --git a/test/ClangImporter/pch-bridging-header.swift b/test/ClangImporter/pch-bridging-header.swift index 851e069f0041d..2371547337cd3 100644 --- a/test/ClangImporter/pch-bridging-header.swift +++ b/test/ClangImporter/pch-bridging-header.swift @@ -7,11 +7,13 @@ // RUN: %target-typecheck-verify-swift -import-objc-header %t/sdk-bridging-header.pch // Now test the driver-automated version is inert when disabled -// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -disable-bridging-pch -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h +// Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now. +// 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 // RUN: not ls %t/tmp/*.pch >/dev/null 2>&1 // Test the driver-automated version works by default -// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h +// Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now. +// 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 // RUN: ls %t/tmp/*.pch >/dev/null 2>&1 // RUN: llvm-objdump --raw-clang-ast %t/tmp/*.pch | llvm-bcanalyzer -dump | %FileCheck %s // CHECK: ORIGINAL_FILE{{.*}}Inputs/sdk-bridging-header.h diff --git a/test/DebugInfo/ASTSection_ObjC.swift b/test/DebugInfo/ASTSection_ObjC.swift index 872c114f06ad7..6acb79357a66e 100644 --- a/test/DebugInfo/ASTSection_ObjC.swift +++ b/test/DebugInfo/ASTSection_ObjC.swift @@ -4,7 +4,7 @@ // RUN: %empty-directory(%t) // RUN: cp %S/Inputs/serialized-objc-header.h %t -// 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 +// 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 // RUN: %lldb-moduleimport-test -verbose %t/ASTSection-with-ObjC | %FileCheck %s // RUN: rm %t/serialized-objc-header.h diff --git a/test/DebugInfo/file_compilation_dir.swift b/test/DebugInfo/file_compilation_dir.swift index 8d029751ad0b1..d0c8e93ab24a3 100644 --- a/test/DebugInfo/file_compilation_dir.swift +++ b/test/DebugInfo/file_compilation_dir.swift @@ -6,10 +6,11 @@ // RUN: mkdir -p %t // RUN: cd %t // RUN: cp %s . -// RUN: %target-swiftc_driver -g \ +// Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now. +// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \ // RUN: -c -file-compilation-dir /path/to \ // RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL %s -// RUN: %target-swiftc_driver -g \ +// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \ // RUN: -c -file-compilation-dir . \ // RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL-CWD %s diff --git a/test/IDE/local_types.swift b/test/IDE/local_types.swift index baa0a4687a2ea..e957ee0d88ee2 100644 --- a/test/IDE/local_types.swift +++ b/test/IDE/local_types.swift @@ -1,7 +1,10 @@ // Tests lookup and mangling of local types +// Avoid emitting the module separately since that would skip non-inlinable +// function bodies without types, and we want to print the decls in +// `singleDefaultArgument`. // RUN: %empty-directory(%t) -// RUN: %target-swiftc_driver -v -emit-module -module-name LocalTypes -o %t/LocalTypes.swiftmodule %s +// RUN: %target-swiftc_driver -v -no-emit-module-separately -emit-module -module-name LocalTypes -o %t/LocalTypes.swiftmodule %s // RUN: %target-swift-ide-test -print-local-types -I %t -module-to-print LocalTypes -source-filename %s > %t.dump // RUN: %FileCheck %s < %t.dump // RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.dump diff --git a/test/IDE/merge_local_types.swift b/test/IDE/merge_local_types.swift index c5cb75e5d7774..973f6fc125b3e 100644 --- a/test/IDE/merge_local_types.swift +++ b/test/IDE/merge_local_types.swift @@ -3,7 +3,7 @@ // RUN: %empty-directory(%t) // Create separate modules and merge them together -// RUN: %target-swiftc_driver -v -emit-module -module-name LocalTypesMerged -o %t/LocalTypesMerged.swiftmodule %s %S/local_types.swift +// RUN: %target-swiftc_driver -v -no-emit-module-separately -emit-module -module-name LocalTypesMerged -o %t/LocalTypesMerged.swiftmodule %s %S/local_types.swift // RUN: %target-swift-ide-test -print-local-types -I %t -module-to-print LocalTypesMerged -source-filename %s | %FileCheck %s -allow-deprecated-dag-overlap diff --git a/test/Index/Store/driver-index-with-auxiliary-outputs.swift b/test/Index/Store/driver-index-with-auxiliary-outputs.swift deleted file mode 100644 index 3979097671928..0000000000000 --- a/test/Index/Store/driver-index-with-auxiliary-outputs.swift +++ /dev/null @@ -1,35 +0,0 @@ -// RUN: %empty-directory(%t) - -// This test is very deliberately *not* indexing the current file; we need to -// make sure the frontend job doesn't try to emit the auxiliary outputs based -// on the non-indexed files. (This is how Xcode currently constructs -index-file -// invocations: take a normal build command and add extra arguments to it.) -// RUN: %target-build-swift -index-file -index-file-path %S/Inputs/SwiftModuleA.swift %S/Inputs/SwiftModuleA.swift %s -index-store-path %t/idx -Xfrontend -index-ignore-stdlib -module-name driver_index -emit-objc-header-path %t/out.h -emit-module-interface-path %t/out.swiftinterface - -// RUN: test ! -f %t/out.h -// RUN: test ! -f %t/out.swiftinterface -// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s - -// CHECK-LABEL: module-name: driver_index -// CHECK: DEPEND START -// CHECK-NOT: Record | -// CHECK: Record | user | {{.+}}SwiftModuleA.swift -// CHECK-NOT: Record | -// CHECK: DEPEND END - -#if _runtime(_ObjC) - -// Do a stronger test here involving checking @objc -import ObjectiveC - -public class PossiblyObjC: NSObject { - @objc public init(x: Int) {} -} - -#else // _runtime(_ObjC) - -public class Boring { - init() -} - -#endif // _runtime(_ObjC) diff --git a/test/Misc/stats_dir_failure_count.swift b/test/Misc/stats_dir_failure_count.swift index d771991301fac..7e678cbd1476f 100644 --- a/test/Misc/stats_dir_failure_count.swift +++ b/test/Misc/stats_dir_failure_count.swift @@ -1,7 +1,7 @@ // Check that a failed process-tree emits nonzero failure counters // RUN: %empty-directory(%t) // RUN: echo zzz >%t/other.swift -// RUN: not %target-swiftc_driver -continue-building-after-errors -D BROKEN -j 2 -typecheck -stats-output-dir %t %s %t/other.swift +// 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 // RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/stats.csv %t // RUN: %FileCheck -input-file %t/stats.csv -check-prefix=FAILURE %s // FAILURE: {{"Driver.NumProcessFailures" 1$}} diff --git a/test/Misc/stats_dir_plausible_maxrss.swift b/test/Misc/stats_dir_plausible_maxrss.swift index a579a8eb26600..362407d2148c4 100644 --- a/test/Misc/stats_dir_plausible_maxrss.swift +++ b/test/Misc/stats_dir_plausible_maxrss.swift @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) // RUN: touch %t/main.swift -// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift +// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift // RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/frontend.csv %t // RUN: %FileCheck -input-file %t/frontend.csv %s diff --git a/test/ModuleInterface/convenience-init.swift b/test/ModuleInterface/convenience-init.swift index 2a8aee408be7b..0a136d9c221d1 100644 --- a/test/ModuleInterface/convenience-init.swift +++ b/test/ModuleInterface/convenience-init.swift @@ -1,7 +1,7 @@ // RUN: %empty-directory(%t) // Generate the parseable interface of the current file via the merge-modules step -// RUN: %target-build-swift -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/TestMerge.swiftinterface -module-name Test %s +// 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 // Generate the parseable interface of the current file via a single frontend invocation // RUN: %target-swift-frontend -typecheck -enable-objc-interop -emit-module-interface-path %t/TestSingle.swiftinterface -module-name Test %s diff --git a/test/ModuleInterface/enums-layout.swift b/test/ModuleInterface/enums-layout.swift index 7bf5423d9b5b1..a1c15b189677b 100644 --- a/test/ModuleInterface/enums-layout.swift +++ b/test/ModuleInterface/enums-layout.swift @@ -1,5 +1,5 @@ // RUN: %empty-directory(%t) -// 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 +// 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 // RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-MULTI-FILE %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface // RUN: %target-swift-frontend -enable-objc-interop -compile-module-from-interface %t/Lib.swiftinterface -o %t/compiled-from-interface.swiftmodule -module-name Lib // RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s diff --git a/test/ModuleInterface/print_package_name_in_non_package_interface.swift b/test/ModuleInterface/print_package_name_in_non_package_interface.swift index b743b9f3177e2..511b44ba0a94a 100644 --- a/test/ModuleInterface/print_package_name_in_non_package_interface.swift +++ b/test/ModuleInterface/print_package_name_in_non_package_interface.swift @@ -51,7 +51,10 @@ // RUN: rm -rf %t/Bar.package.swiftinterface /// Print -package-name in public or private interface. -// RUN: %target-build-swift -emit-module %t/Bar.swift -I %t \ +/// Note the order of arguments differs across old/new driver, so force old +/// driver for now. +// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-build-swift \ +// RUN: -emit-module %t/Bar.swift -I %t \ // RUN: -module-name Bar -package-name barpkg \ // RUN: -enable-library-evolution -swift-version 6 \ // RUN: -Xfrontend -print-package-name-in-non-package-interface \ diff --git a/test/SILOptimizer/cmo-with-package-decls.swift b/test/SILOptimizer/cmo-with-package-decls.swift index 259025678ee67..48d5a3f2225fa 100644 --- a/test/SILOptimizer/cmo-with-package-decls.swift +++ b/test/SILOptimizer/cmo-with-package-decls.swift @@ -3,7 +3,7 @@ // 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 // 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 -// 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 +// 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 // RUN: %FileCheck %s < %t/Main.sil // REQUIRES: swift_in_compiler @@ -12,7 +12,7 @@ import Module import ModuleTBD // static ModuleStruct.privateFunctionPointer -// CHECK-LABEL: sil_global public_external @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}} +// CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}} // static ModuleStruct.publicFunctionPointer // CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV21publicFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int diff --git a/test/SILOptimizer/default-cmo.swift b/test/SILOptimizer/default-cmo.swift index d97b656209f24..0e9099b0f06f3 100644 --- a/test/SILOptimizer/default-cmo.swift +++ b/test/SILOptimizer/default-cmo.swift @@ -5,14 +5,14 @@ // 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 // 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 -// RUN: %target-build-swift -O -wmo -module-name=Main -package-name Pkg -I%t -I%S/Inputs/cross-module %s -emit-sil | %FileCheck %s +// 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 // REQUIRES: swift_in_compiler import Module import ModuleTBD -// CHECK-LABEL: sil_global public_external @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}} +// CHECK-LABEL: sil_global public_external [serialized] @$s6Module0A6StructV22privateFunctionPointeryS2icvpZ : $@callee_guaranteed (Int) -> Int{{$}} public func callPublicFunctionPointer(_ x: Int) -> Int { return Module.ModuleStruct.publicFunctionPointer(x) diff --git a/test/Serialization/search-paths-relative.swift b/test/Serialization/search-paths-relative.swift index 1b673196fb493..398562d1b2d34 100644 --- a/test/Serialization/search-paths-relative.swift +++ b/test/Serialization/search-paths-relative.swift @@ -4,7 +4,8 @@ // RUN: %empty-directory(%t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule) // 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 -// 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 +// Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now. +// 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 // RUN: %target-swift-frontend %s -typecheck -I %t // Ensure that in Swift 6 mode we do not read out search paths, thus are no longer able to diff --git a/test/SourceKit/InterfaceGen/gen_module_group.swift b/test/SourceKit/InterfaceGen/gen_module_group.swift index bffaaa4c26693..ee03cdd998ea4 100644 --- a/test/SourceKit/InterfaceGen/gen_module_group.swift +++ b/test/SourceKit/InterfaceGen/gen_module_group.swift @@ -6,7 +6,7 @@ // FIXME: We don't currently handle group info for multi-file builds, // so just make sure we don't crash. // RUN: %empty-directory(%t.multifrontend) -// 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 +// 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 // RUN: %sourcekitd-test -req=interface-gen -module MyModule -group-name A -- -I %t.multifrontend -target %target-triple | %FileCheck -check-prefix=EMPTY %s // GROUPA: MyClass diff --git a/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/SomeProtocol.swift b/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/SomeProtocol.swift index 9d1c723db6b8d..6c05f6eedc712 100644 --- a/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/SomeProtocol.swift +++ b/test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full/SomeProtocol.swift @@ -4,8 +4,12 @@ // RUN: %FileCheck %s --input-file %t/SomeProtocol.symbols.json // RUN: %FileCheck %s --input-file %t/SomeProtocol.symbols.json --check-prefix MULTI +// Note we use '-wmo' here to make sure the driver doesn't do merge-modules, +// which would result in printing the Type instead of TypeRepr, leading to +// inconsistency with the new driver. Once we switch to always using the new +// driver, we can remove it. // RUN: %empty-directory(%t) -// RUN: %target-build-swift %s -module-name SomeProtocol -emit-module -emit-module-path %t/SomeProtocol.swiftmodule -emit-symbol-graph -emit-symbol-graph-dir %t/ +// 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/ // RUN: %validate-json %t/SomeProtocol.symbols.json %t/SomeProtocol.formatted.symbols.json // RUN: %FileCheck %s --input-file %t/SomeProtocol.formatted.symbols.json // RUN: %FileCheck %s --input-file %t/SomeProtocol.formatted.symbols.json --check-prefix MULTI @@ -19,7 +23,7 @@ public func doSomething(with param: some SomeProtocol) {} public protocol OtherProtocol {} -public func doSomethingElse(with param: some SomeProtocol & OtherProtocol) {} +public func doSomethingElse(with param: some OtherProtocol & SomeProtocol) {} // CHECK-LABEL: "precise": "s:12SomeProtocol11doSomething4withyx_tA2ARzlF", diff --git a/test/TBD/output-path-deduction.swift b/test/TBD/output-path-deduction.swift deleted file mode 100644 index c7bdf51a24896..0000000000000 --- a/test/TBD/output-path-deduction.swift +++ /dev/null @@ -1,13 +0,0 @@ -// REQUIRES: VENDOR=apple -// RUN: %empty-directory(%t) - -// RUN: cd %t; %target-build-swift -emit-module -emit-tbd %s -Xfrontend -tbd-install_name -Xfrontend test -// RUN: test -e %t/main.tbd -// RUN: %target-build-swift -emit-module -emit-tbd %s -o %t/default -Xfrontend -tbd-install_name -Xfrontend test -// RUN: test -e %t/default.tbd -// RUN: %target-build-swift -emit-module -emit-tbd %s -o %t/module_name -module-name module_name_different -Xfrontend -tbd-install_name -Xfrontend test -// RUN: test -e %t/module_name.tbd -// RUN: %target-build-swift -emit-module -emit-tbd-path %t/hard_to_guess_explicit_path.tbd %s -o %t/explicit_path -Xfrontend -tbd-install_name -Xfrontend test -// RUN: test -e %t/hard_to_guess_explicit_path.tbd -// RUN: %target-build-swift -emit-module -emit-tbd %s -emit-module-path %t/emit_module_path.swiftmodule -module-name emit_module_path_different -Xfrontend -tbd-install_name -Xfrontend test -// RUN: test -e %t/emit_module_path.tbd diff --git a/test/attr/open.swift b/test/attr/open.swift index 862b89d487ad3..9a8fb1172f708 100644 --- a/test/attr/open.swift +++ b/test/attr/open.swift @@ -1,5 +1,5 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift -emit-module -c %S/Inputs/OpenHelpers.swift -o %t/OpenHelpers.swiftmodule +// RUN: %target-build-swift -emit-module %S/Inputs/OpenHelpers.swift -o %t/OpenHelpers.swiftmodule // RUN: %target-typecheck-verify-swift -I %t import OpenHelpers diff --git a/validation-test/Serialization/bridging-header-first.swift b/validation-test/Serialization/bridging-header-first.swift index a05b57c65c3fa..6691c8e6c83f7 100644 --- a/validation-test/Serialization/bridging-header-first.swift +++ b/validation-test/Serialization/bridging-header-first.swift @@ -1,9 +1,9 @@ // RUN: %empty-directory(%t) -// 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 +// 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 // RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s -// 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 +// 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 // RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s // REQUIRES: objc_interop diff --git a/validation-test/Serialization/rdar29694978.swift b/validation-test/Serialization/rdar29694978.swift index 50a74e71502ef..831f312553a7b 100644 --- a/validation-test/Serialization/rdar29694978.swift +++ b/validation-test/Serialization/rdar29694978.swift @@ -1,5 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift %s -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule +// FIXME: Crashes with PCH (https://github.com/swiftlang/swift/issues/76641) +// RUN: %target-build-swift %s -disable-bridging-pch -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule // RUN: %target-swift-ide-test -print-module -module-to-print=Library -source-filename=x -I %S/Inputs/ -I %t | %FileCheck %s // REQUIRES: objc_interop diff --git a/validation-test/execution/interpret-with-dependencies.swift b/validation-test/execution/interpret-with-dependencies.swift index 166d98e253fd6..c8edff6cc8aeb 100644 --- a/validation-test/execution/interpret-with-dependencies.swift +++ b/validation-test/execution/interpret-with-dependencies.swift @@ -8,17 +8,6 @@ // RUN: %swift_driver -I %S/Inputs/custom-modules -L%t %s | %FileCheck %s // CHECK: {{okay}} -// Now test a dependency on a library in the compiler's resource directory. -// RUN: %empty-directory(%t/rsrc/%target-sdk-name) -// RUN: ln -s %t/libabc.dylib %t/rsrc/%target-sdk-name/ -// RUN: ln -s %platform-module-dir/* %t/rsrc/%target-sdk-name/ -// RUN: ln -s %platform-module-dir/../shims %t/rsrc/ -// RUN: %empty-directory(%t/other) -// RUN: ln -s %t/libfoo.dylib %t/other - -// Disabled, because it fails on some CI jobs with "missing required module 'SwiftShims'" -// dontrun: %swift_driver -I %S/Inputs/custom-modules -L%t/other -resource-dir %t/rsrc/ %s | %FileCheck %s - import foo if test() == 42 {