mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[test] Update ParseableInterface to ModuleInterface
Also remove uses of -emit-parseable-module-interface from tests
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: cp %S/Inputs/pch-loading-error.h %t/pch-loading-error.h
|
||||
// RUN: %target-swift-frontend -parse-as-library -module-name=pch_loading_error -emit-sil %s -enable-objc-interop -import-objc-header %t/pch-loading-error.h -pch-output-dir %t/pch
|
||||
// RUN: %{python} %S/../ParseableInterface/ModuleCache/Inputs/make-old.py %t/pch/*
|
||||
// RUN: %{python} %S/../ModuleInterface/ModuleCache/Inputs/make-old.py %t/pch/*
|
||||
// RUN: echo "// force newer header than pch" >> %t/pch-loading-error.h
|
||||
// RUN: %target-swift-frontend -parse-as-library -module-name=pch_loading_error -emit-sil %s -enable-objc-interop -import-objc-header %t/pch-loading-error.h -pch-output-dir %t/pch 2>&1 | %FileCheck %s
|
||||
// RUN: %{python} %S/../ParseableInterface/ModuleCache/Inputs/check-is-new.py %t/pch/*
|
||||
// RUN: %{python} %S/../ModuleInterface/ModuleCache/Inputs/check-is-new.py %t/pch/*
|
||||
|
||||
// CHECK-NOT: fatal error
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend-typecheck %S/basic.swift \
|
||||
// RUN: -emit-parseable-module-interface-path %t/basic.swiftinterface
|
||||
// RUN: -emit-module-interface-path %t/basic.swiftinterface
|
||||
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - \
|
||||
// RUN: | %FileCheck %s
|
||||
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - \
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo 2>&1 | %FileCheck %s
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-module-interface -o %t/foo 2>&1 | %FileCheck %s
|
||||
|
||||
// CHECK: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-SAME: emit-interface.swift
|
||||
// CHECK: swift{{c?(\.EXE)?"?}} -frontend -merge-modules
|
||||
// CHECK-SAME: -emit-parseable-module-interface-path {{.+[/\\]}}foo.swiftinterface
|
||||
// CHECK-SAME: -emit-module-interface-path {{.+[/\\]}}foo.swiftinterface
|
||||
// CHECK: {{(bin/)?}}ld
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-WHOLE-MODULE %s
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-module-interface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-WHOLE-MODULE %s
|
||||
|
||||
// CHECK-WHOLE-MODULE: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-WHOLE-MODULE-SAME: emit-interface.swift
|
||||
// CHECK-WHOLE-MODULE-SAME: -emit-parseable-module-interface-path {{.+[/\\]}}foo.swiftinterface
|
||||
// CHECK-WHOLE-MODULE-SAME: -emit-module-interface-path {{.+[/\\]}}foo.swiftinterface
|
||||
// CHECK-WHOLE-MODULE-NOT: -merge-modules
|
||||
// CHECK-WHOLE-MODULE: {{(bin/)?}}ld
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface-path %t/unrelated.swiftinterface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-EXPLICIT-PATH %s
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-module-interface-path %t/unrelated.swiftinterface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-EXPLICIT-PATH %s
|
||||
|
||||
// CHECK-EXPLICIT-PATH: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-EXPLICIT-PATH-SAME: emit-interface.swift
|
||||
// CHECK-EXPLICIT-PATH-SAME: -emit-parseable-module-interface-path {{.+[/\\]}}unrelated.swiftinterface
|
||||
// CHECK-EXPLICIT-PATH-SAME: -emit-module-interface-path {{.+[/\\]}}unrelated.swiftinterface
|
||||
|
||||
// Ensure that we emit arguments when we force filelists as well
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo -module-name foo -force-single-frontend-invocation -driver-filelist-threshold=0 2>&1 | %FileCheck -check-prefix=CHECK-FILELIST %s
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-module-interface -o %t/foo -module-name foo -force-single-frontend-invocation -driver-filelist-threshold=0 2>&1 | %FileCheck -check-prefix=CHECK-FILELIST %s
|
||||
|
||||
// CHECK-FILELIST: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-FILELIST-SAME: -supplementary-output-file-map
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
// RUN: not %swiftc_driver -import-objc-header fake.h -import-underlying-module -c %s 2>&1 | %FileCheck -check-prefix=FRAMEWORK_BRIDGING_HEADER %s
|
||||
// FRAMEWORK_BRIDGING_HEADER: error: using bridging headers with framework targets is unsupported
|
||||
|
||||
// RUN: not %swiftc_driver -import-objc-header fake.h -emit-parseable-module-interface %s 2>&1 | %FileCheck -check-prefix=BRIDGING_HEADER_SWIFTINTERFACE %s
|
||||
// RUN: not %swiftc_driver -import-objc-header fake.h -emit-parseable-module-interface-path fake.swiftinterface %s 2>&1 | %FileCheck -check-prefix=BRIDGING_HEADER_SWIFTINTERFACE %s
|
||||
// RUN: not %swiftc_driver -import-objc-header fake.h -emit-module-interface %s 2>&1 | %FileCheck -check-prefix=BRIDGING_HEADER_SWIFTINTERFACE %s
|
||||
// RUN: not %swiftc_driver -import-objc-header fake.h -emit-module-interface-path fake.swiftinterface %s 2>&1 | %FileCheck -check-prefix=BRIDGING_HEADER_SWIFTINTERFACE %s
|
||||
// BRIDGING_HEADER_SWIFTINTERFACE: error: using bridging headers with module interfaces is unsupported
|
||||
|
||||
// RUN: %swift_driver -### | %FileCheck -check-prefix=DEFAULT_REPL %s
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// NO-PRIMARY-FILE: warning: ignoring -emit-reference-dependencies (requires -primary-file)
|
||||
|
||||
|
||||
// RUN: %target-swift-frontend -emit-dependencies-path - -emit-module "%S/../Inputs/empty file.swift" -o "%t/empty file.swiftmodule" -emit-module-doc-path "%t/empty file.swiftdoc" -emit-objc-header-path "%t/empty file.h" -emit-parseable-module-interface-path "%t/empty file.swiftinterface" | %FileCheck -check-prefix=CHECK-MULTIPLE-OUTPUTS %s
|
||||
// RUN: %target-swift-frontend -emit-dependencies-path - -emit-module "%S/../Inputs/empty file.swift" -o "%t/empty file.swiftmodule" -emit-module-doc-path "%t/empty file.swiftdoc" -emit-objc-header-path "%t/empty file.h" -emit-module-interface-path "%t/empty file.swiftinterface" | %FileCheck -check-prefix=CHECK-MULTIPLE-OUTPUTS %s
|
||||
|
||||
// CHECK-MULTIPLE-OUTPUTS-LABEL: empty\ file.swiftmodule :
|
||||
// CHECK-MULTIPLE-OUTPUTS: Inputs/empty\ file.swift
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// RUN: not %target-swift-frontend -resolve-imports -emit-objc-header %s 2>&1 | %FileCheck -check-prefix=RESOLVE_IMPORTS_NO_OBJC_HEADER %s
|
||||
// RESOLVE_IMPORTS_NO_OBJC_HEADER: error: this mode does not support emitting Objective-C headers{{$}}
|
||||
|
||||
// RUN: not %target-swift-frontend -parse -emit-parseable-module-interface-path %t %s 2>&1 | %FileCheck -check-prefix=PARSE_NO_INTERFACE %s
|
||||
// RUN: not %target-swift-frontend -parse -emit-module-interface-path %t %s 2>&1 | %FileCheck -check-prefix=PARSE_NO_INTERFACE %s
|
||||
// PARSE_NO_INTERFACE: error: this mode does not support emitting module interface files{{$}}
|
||||
// RUN: not %target-swift-frontend -emit-silgen -emit-parseable-module-interface-path %t %s 2>&1 | %FileCheck -check-prefix=SILGEN_NO_INTERFACE %s
|
||||
// RUN: not %target-swift-frontend -emit-silgen -emit-module-interface-path %t %s 2>&1 | %FileCheck -check-prefix=SILGEN_NO_INTERFACE %s
|
||||
// SILGEN_NO_INTERFACE: error: this mode does not support emitting module interface files{{$}}
|
||||
|
||||
@@ -50,7 +50,7 @@ print(someFunc())
|
||||
// RUN: %target-swift-frontend \
|
||||
// RUN: -emit-module \
|
||||
// RUN: -module-name SomeModule \
|
||||
// RUN: -emit-parseable-module-interface-path %t/SDK/Frameworks/SomeModule.framework/Modules/SomeModule.swiftmodule/%module-target-triple.swiftinterface \
|
||||
// RUN: -emit-module-interface-path %t/SDK/Frameworks/SomeModule.framework/Modules/SomeModule.swiftmodule/%module-target-triple.swiftinterface \
|
||||
// RUN: -o /dev/null \
|
||||
// RUN: -swift-version 5 \
|
||||
// RUN: -enable-library-evolution \
|
||||
@@ -114,7 +114,7 @@ print(someFunc())
|
||||
// --- Prebuild SDK module.
|
||||
// RUN: mkdir -p %t/prebuiltcache/SomeModule.swiftmodule
|
||||
// RUN: %target-swift-frontend \
|
||||
// RUN: -build-module-from-parseable-interface \
|
||||
// RUN: -compile-module-from-interface \
|
||||
// RUN: -module-name SomeModule \
|
||||
// RUN: -o %t/prebuiltcache/SomeModule.swiftmodule/%module-target-triple.swiftmodule \
|
||||
// RUN: %t/SDK/Frameworks/SomeModule.framework/Modules/SomeModule.swiftmodule/%module-target-triple.swiftinterface
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
//
|
||||
// RUN: mkdir %t/MCP %t/prebuilt-cache %t/my-sdk
|
||||
// RUN: cp -r %S/Inputs/mock-sdk/. %t/my-sdk
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
//
|
||||
// Check the prebuilt modules don't contain dependencies in the module cache, prebuilt cache, or resource dir
|
||||
// RUN: llvm-bcanalyzer -dump %t/prebuilt-cache/ExportedLib.swiftmodule | %FileCheck %s -check-prefix=PREBUILT
|
||||
@@ -19,8 +19,8 @@
|
||||
// Re-build them in the opposite order
|
||||
// RUN: %empty-directory(%t/prebuilt-cache)
|
||||
// RUN: %empty-directory(%t/MCP)
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
//
|
||||
// Check they still don't contain dependencies in the module cache or prebuilt cache
|
||||
// RUN: llvm-bcanalyzer -dump %t/prebuilt-cache/ExportedLib.swiftmodule | %FileCheck %s -check-prefix=PREBUILT
|
||||
@@ -4,8 +4,8 @@
|
||||
//
|
||||
// RUN: mkdir %t/MCP %t/prebuilt-cache %t/my-sdk
|
||||
// RUN: cp -r %S/Inputs/mock-sdk/. %t/my-sdk
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
//
|
||||
// Check the prebuilt modules don't contain dependencies in the module cache, prebuilt cache, or resource dir
|
||||
// RUN: llvm-bcanalyzer -dump %t/prebuilt-cache/ExportedLib.swiftmodule | %FileCheck %s -check-prefix=PREBUILT
|
||||
@@ -19,8 +19,8 @@
|
||||
// Re-build them in the opposite order
|
||||
// RUN: %empty-directory(%t/prebuilt-cache)
|
||||
// RUN: %empty-directory(%t/MCP)
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/SdkLib.swiftmodule -track-system-dependencies -module-name SdkLib %t/my-sdk/SdkLib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -serialize-parseable-module-interface-dependency-hashes -sdk %t/my-sdk -prebuilt-module-cache-path %t/prebuilt-cache -I %t/my-sdk -module-cache-path %t/MCP -o %t/prebuilt-cache/ExportedLib.swiftmodule -track-system-dependencies -module-name ExportedLib %t/my-sdk/ExportedLib.swiftinterface
|
||||
//
|
||||
// Check they still don't contain dependencies in the module cache or prebuilt cache
|
||||
// RUN: llvm-bcanalyzer -dump %t/prebuilt-cache/ExportedLib.swiftmodule | %FileCheck %s -check-prefix=PREBUILT
|
||||
@@ -13,7 +13,7 @@
|
||||
// on a C module with headers that should be in the dependency list.
|
||||
// Put it in the prebuilt cache.
|
||||
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface %t/mock-sdk/ExportedLib.swiftinterface -sdk %t/mock-sdk -o %t/PrebuiltModuleCache/ExportedLib.swiftmodule -serialize-parseable-module-interface-dependency-hashes -track-system-dependencies
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface %t/mock-sdk/ExportedLib.swiftinterface -sdk %t/mock-sdk -o %t/PrebuiltModuleCache/ExportedLib.swiftmodule -serialize-parseable-module-interface-dependency-hashes -track-system-dependencies
|
||||
|
||||
// 2. Make sure the prebuilt module we built has SomeCModule.h as a dependency.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//
|
||||
// RUN: echo 'public func LeafFunc() -> Int { return 10; }' >%t/leaf.swift
|
||||
//
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: test -f %t/LeafModule.swiftinterface
|
||||
// RUN: %FileCheck %s -check-prefix=CHECK-LEAFINTERFACE <%t/LeafModule.swiftinterface
|
||||
// CHECK-LEAFINTERFACE: {{swift-interface-format-version: [0-9\\.]+}}
|
||||
@@ -12,11 +12,11 @@
|
||||
//
|
||||
// Phase 1: build LeafModule into a .swiftinterface file with -target x86_64-macosx-10.9:
|
||||
//
|
||||
// RUN: %swift -target x86_64-apple-macosx10.9 -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -typecheck
|
||||
// RUN: %swift -target x86_64-apple-macosx10.9 -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -typecheck
|
||||
//
|
||||
// Phase 2: build OtherModule into a .swiftinterface file with -target x86_64-macosx-10.10:
|
||||
//
|
||||
// RUN: %swift -target x86_64-apple-macosx10.10 -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -typecheck
|
||||
// RUN: %swift -target x86_64-apple-macosx10.10 -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -typecheck
|
||||
//
|
||||
// Phase 3: build TestModule in -target x86_64-apple-macosx10.11 and import both of these:
|
||||
//
|
||||
@@ -21,9 +21,9 @@
|
||||
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
|
||||
//
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
|
||||
// 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
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
|
||||
@@ -9,11 +9,11 @@
|
||||
//
|
||||
// Phase 1: build LeafModule into a .swiftinterface file with -swift-version 4:
|
||||
//
|
||||
// RUN: %target-swift-frontend -swift-version 4 -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -typecheck
|
||||
// RUN: %target-swift-frontend -swift-version 4 -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -typecheck
|
||||
//
|
||||
// Phase 2: build OtherModule into a .swiftinterface file with -swift-version 4.2:
|
||||
//
|
||||
// RUN: %target-swift-frontend -swift-version 4.2 -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -typecheck
|
||||
// RUN: %target-swift-frontend -swift-version 4.2 -I %t -module-cache-path %t/modulecache -emit-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -typecheck
|
||||
//
|
||||
// Phase 3: build TestModule in -swift-version 5 and import both of these:
|
||||
//
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
// Setup phase 2: build the module.
|
||||
//
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/SomeModule.swiftinterface -module-name SomeModule %t/some-module.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/SomeModule.swiftinterface -module-name SomeModule %t/some-module.swift -emit-module -o /dev/null
|
||||
|
||||
// Actual test: compile and verify the import succeeds (i.e. we only report the error in this file)
|
||||
//
|
||||
@@ -9,7 +9,7 @@
|
||||
//
|
||||
// Phase 1: build LeafModule into a .swiftinterface file:
|
||||
//
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: test -f %t/LeafModule.swiftinterface
|
||||
// RUN: %FileCheck %s -check-prefix=CHECK-LEAFINTERFACE <%t/LeafModule.swiftinterface
|
||||
// CHECK-LEAFINTERFACE: LeafFunc
|
||||
@@ -17,7 +17,7 @@
|
||||
//
|
||||
// Phase 2: build OtherModule into a .swiftinterface _using_ LeafModule via LeafModule.swiftinterface, creating LeafModule-*.swiftmodule along the way.
|
||||
//
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
|
||||
// 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
|
||||
// RUN: test -f %t/OtherModule.swiftinterface
|
||||
// RUN: %FileCheck %s -check-prefix=CHECK-OTHERINTERFACE <%t/OtherModule.swiftinterface
|
||||
// CHECK-OTHERINTERFACE: OtherFunc
|
||||
@@ -19,9 +19,9 @@
|
||||
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
|
||||
//
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
|
||||
// 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
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
|
||||
@@ -18,9 +18,9 @@
|
||||
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
|
||||
//
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
|
||||
// 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
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
|
||||
@@ -19,9 +19,9 @@
|
||||
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
|
||||
//
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
|
||||
// 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
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
|
||||
@@ -18,9 +18,9 @@
|
||||
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
|
||||
//
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
|
||||
// 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
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
|
||||
@@ -18,9 +18,9 @@
|
||||
// Setup phase 2: build modules, pushing timestamps of inputs and intermediates into the past as we go.
|
||||
//
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/leaf.swift %t/other.swift
|
||||
// RUN: %target-swift-frontend -I %t -emit-parseable-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %target-swift-frontend -I %t -emit-module-interface-path %t/LeafModule.swiftinterface -module-name LeafModule %t/leaf.swift -emit-module -o /dev/null
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/LeafModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-parseable-module-interface-path %t/OtherModule.swiftinterface -module-name OtherModule %t/other.swift -emit-module -o /dev/null
|
||||
// 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
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/LeafModule-*.swiftmodule %t/OtherModule.swiftinterface
|
||||
// RUN: %target-swift-frontend -I %t -module-cache-path %t/modulecache -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s
|
||||
// RUN: %{python} %S/Inputs/make-old.py %t/modulecache/OtherModule-*.swiftmodule
|
||||
@@ -5,7 +5,7 @@
|
||||
// First, prebuild a module and put it in the prebuilt cache.
|
||||
// RUN: sed -e 's/FromInterface/FromPrebuilt/g' %S/Inputs/prebuilt-module-cache/Lib.swiftinterface | tr -d '\r' > %t/Lib.swiftinterface.tmp
|
||||
// RUN: mv %t/Lib.swiftinterface.tmp %t/Lib.swiftinterface
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -module-cache-path %t/MCP -serialize-parseable-module-interface-dependency-hashes -o %t/prebuilt-cache/Lib.swiftmodule %t/Lib.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -module-cache-path %t/MCP -serialize-parseable-module-interface-dependency-hashes -o %t/prebuilt-cache/Lib.swiftmodule %t/Lib.swiftinterface
|
||||
|
||||
// Next, use the module and check if the forwarding module is in place.
|
||||
// RUN: not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP -sdk %S/Inputs -I %S/Inputs/prebuilt-module-cache/ -prebuilt-module-cache-path %t/prebuilt-cache %s 2>&1 | %FileCheck -check-prefix=FROM-PREBUILT %s
|
||||
@@ -5,11 +5,11 @@
|
||||
// RUN: echo 'public func showsUpInBothPlaces() {}' > %t/Lib.swift
|
||||
|
||||
// 1. Create a .swiftinterface file containing just one API, and put it inside a second build dir (without a .swiftmodule)
|
||||
// RUN: %target-swift-frontend -typecheck %t/Lib.swift -emit-parseable-module-interface-path %t/SecondBuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftinterface -module-name Lib
|
||||
// RUN: %target-swift-frontend -typecheck %t/Lib.swift -emit-module-interface-path %t/SecondBuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftinterface -module-name Lib
|
||||
|
||||
// 2. Add a new API to the module, and compile just the serialized version in the build dir.
|
||||
// RUN: echo 'public func onlyInTheCompiledModule() {}' >> %t/Lib.swift
|
||||
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -o %t/BuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftmodule -emit-parseable-module-interface-path %t/BuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftinterface -module-name Lib
|
||||
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -o %t/BuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftmodule -emit-module-interface-path %t/BuildDir/Lib.framework/Modules/Lib.swiftmodule/%target-cpu.swiftinterface -module-name Lib
|
||||
|
||||
// 3. Make sure when we compile this test file, we can access both APIs since we'll
|
||||
// load the compiled .swiftmodule instead of the .swiftinterface in the SDK.
|
||||
@@ -5,11 +5,11 @@
|
||||
// RUN: echo 'public func showsUpInBothPlaces() {}' > %t/Lib.swift
|
||||
|
||||
// 1. Create a .swiftinterface file containing just one API, and put it inside a second build dir (without a .swiftmodule)
|
||||
// RUN: %target-swift-frontend -typecheck %t/Lib.swift -emit-parseable-module-interface-path %t/SecondBuildDir/Lib.swiftmodule/%target-cpu.swiftinterface -module-name Lib
|
||||
// RUN: %target-swift-frontend -typecheck %t/Lib.swift -emit-module-interface-path %t/SecondBuildDir/Lib.swiftmodule/%target-cpu.swiftinterface -module-name Lib
|
||||
|
||||
// 2. Add a new API to the module, and compile just the serialized version in the build dir.
|
||||
// RUN: echo 'public func onlyInTheCompiledModule() {}' >> %t/Lib.swift
|
||||
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -o %t/BuildDir/Lib.swiftmodule -emit-parseable-module-interface-path %t/BuildDir/Lib.swiftinterface
|
||||
// RUN: %target-swift-frontend -emit-module %t/Lib.swift -o %t/BuildDir/Lib.swiftmodule -emit-module-interface-path %t/BuildDir/Lib.swiftinterface
|
||||
|
||||
// 3. Make sure when we compile this test file, we can access both APIs since we'll
|
||||
// load the compiled .swiftmodule instead of the .swiftinterface in the SDK.
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -emit-module -emit-parseable-module-interface-path %t/Lib.swiftinterface -emit-module-doc -parse-stdlib -o %t/Lib.swiftmodule %s
|
||||
// RUN: %target-swift-frontend -emit-module -emit-module-interface-path %t/Lib.swiftinterface -emit-module-doc -parse-stdlib -o %t/Lib.swiftmodule %s
|
||||
// RUN: %target-swift-ide-test -print-module -module-to-print=Lib -access-filter-public -I %t -source-filename=x -prefer-type-repr=false -fully-qualified-types=true > %t/from-module.txt
|
||||
// RUN: %FileCheck %s < %t/from-module.txt
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// Try again with architecture-specific subdirectories.
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %empty-directory(%t/Lib.swiftmodule)
|
||||
// RUN: %target-swift-frontend -emit-module -emit-parseable-module-interface-path %t/Lib.swiftmodule/%target-cpu.swiftinterface -emit-module-doc -parse-stdlib -o %t/Lib.swiftmodule/%target-swiftmodule-name -module-name Lib %s
|
||||
// RUN: %target-swift-frontend -emit-module -emit-module-interface-path %t/Lib.swiftmodule/%target-cpu.swiftinterface -emit-module-doc -parse-stdlib -o %t/Lib.swiftmodule/%target-swiftmodule-name -module-name Lib %s
|
||||
// RUN: %target-swift-ide-test -print-module -module-to-print=Lib -access-filter-public -I %t -source-filename=x -prefer-type-repr=false -fully-qualified-types=true > %t/from-module.txt
|
||||
// RUN: %FileCheck %s < %t/from-module.txt
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
// Deliberately pass the wrong target at the command line and see what happens.
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %swift -sdk %sdk -target arm64-apple-ios10 -build-module-from-parseable-interface %s -o %t/NoWrongSDKWarning.swiftmodule 2>&1 | %FileCheck -allow-empty %s
|
||||
// RUN: %swift -sdk %sdk -target arm64-apple-ios10 -compile-module-from-interface %s -o %t/NoWrongSDKWarning.swiftmodule 2>&1 | %FileCheck -allow-empty %s
|
||||
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// not be written in any of the invocations below.
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -o %t/ParseStdlib.swiftmodule %s
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -o %t/ParseStdlib.swiftmodule %s
|
||||
// RUN: %target-swift-ide-test -print-module -module-to-print ParseStdlib -I %t -source-filename x -print-interface | %FileCheck %s
|
||||
|
||||
// CHECK: func test(_: Builtin.Int42)
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
// ...and then make sure parse-and-typecheck-and-serialize works.
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -o %t/SmokeTest.swiftmodule %s
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -o %t/SmokeTest.swiftmodule %s
|
||||
// RUN: %target-swift-ide-test -print-module -module-to-print SmokeTest -I %t -source-filename x -print-interface > %t/SmokeTest.txt
|
||||
// RUN: %FileCheck %s < %t/SmokeTest.txt
|
||||
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t/SmokeTest.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface %s -module-name AccessFilter
|
||||
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface %s -module-name AccessFilter
|
||||
// RUN: %FileCheck %s < %t.swiftinterface
|
||||
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface -enable-library-evolution %s
|
||||
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface -enable-library-evolution %s
|
||||
// RUN: %FileCheck %s < %t.swiftinterface
|
||||
|
||||
// CHECK: @_transparent public func glass() -> Swift.Int { return 0 }{{$}}
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: echo 'public func externalFunc() {}' | %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/Library.swiftinterface -
|
||||
// RUN: echo 'public func externalFunc() {}' | %target-swift-frontend -typecheck -emit-module-interface-path %t/Library.swiftinterface -
|
||||
// RUN: %target-swift-frontend -typecheck %s -I %t
|
||||
|
||||
#if canImport(Library)
|
||||
@@ -1,4 +1,4 @@
|
||||
// RUN: %target-swift-frontend-typecheck -emit-parseable-module-interface-path %t.swiftinterface %s
|
||||
// RUN: %target-swift-frontend-typecheck -emit-module-interface-path %t.swiftinterface %s
|
||||
// RUN: %FileCheck %s < %t.swiftinterface
|
||||
// RUN: %FileCheck -check-prefix CHECK-END %s < %t.swiftinterface
|
||||
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
|
||||
@@ -1,18 +1,18 @@
|
||||
// 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-parseable-module-interface-path %t/TestMerge.swiftinterface -module-name Test %s
|
||||
// RUN: %target-build-swift -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-parseable-module-interface-path %t/TestSingle.swiftinterface -module-name Test %s
|
||||
// RUN: %target-swift-frontend -typecheck -enable-objc-interop -emit-module-interface-path %t/TestSingle.swiftinterface -module-name Test %s
|
||||
|
||||
// Make sure both don't add override for inits shadowing convenience initializers
|
||||
// RUN: %FileCheck --check-prefixes=CHECK,SINGLE %s < %t/TestSingle.swiftinterface
|
||||
// RUN: %FileCheck --check-prefixes=CHECK,MERGE %s < %t/TestMerge.swiftinterface
|
||||
|
||||
// Check we can consume the interface without issue
|
||||
// RUN: %target-swift-frontend -swift-version 5 -build-module-from-parseable-interface -o %t/Test.swiftmodule %t/TestSingle.swiftinterface
|
||||
// RUN: %target-swift-frontend -swift-version 5 -build-module-from-parseable-interface -o %t/Test.swiftmodule %t/TestMerge.swiftinterface
|
||||
// RUN: %target-swift-frontend -swift-version 5 -compile-module-from-interface -o %t/Test.swiftmodule %t/TestSingle.swiftinterface
|
||||
// RUN: %target-swift-frontend -swift-version 5 -compile-module-from-interface -o %t/Test.swiftmodule %t/TestMerge.swiftinterface
|
||||
|
||||
public class Base {
|
||||
let x: Int
|
||||
12
test/ModuleInterface/dataflow-errors.swift
Normal file
12
test/ModuleInterface/dataflow-errors.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
// RUN: rm -f %t
|
||||
// RUN: not %target-swift-frontend -emit-module-interface-path %t -emit-module -o /dev/null %s
|
||||
// RUN: test ! -f %t
|
||||
// RUN: %target-swift-frontend -emit-module-interface-path %t -typecheck %s
|
||||
// RUN: test -f %t
|
||||
|
||||
public struct BadInit {
|
||||
public var x: Int
|
||||
public init() {
|
||||
return // without initializing 'x'
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
// RUN: %target-swift-frontend -merge-modules -emit-module -o %t/Test.swiftmodule %t/Test~partial.swiftmodule
|
||||
// RUN: %target-swift-ide-test -print-module -module-to-print=Test -source-filename=x -I %t -prefer-type-repr=false -fully-qualified-types=true | %FileCheck %s
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/Test.swiftinterface -module-name Test -enable-library-evolution %s
|
||||
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t/Test.swiftinterface -module-name Test -enable-library-evolution %s
|
||||
// RUN: rm %t/Test.swiftmodule
|
||||
// RUN: echo "import Test" > %t/test-client.swift
|
||||
// RUN: %target-swift-frontend -typecheck -I%t %t/test-client.swift
|
||||
@@ -1,9 +1,9 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/CoreKitClient.swiftinterface -module-name CoreKitClient -I %S/Inputs/exported-module-name-before %s
|
||||
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t/CoreKitClient.swiftinterface -module-name CoreKitClient -I %S/Inputs/exported-module-name-before %s
|
||||
// RUN: %FileCheck -implicit-check-not BAD %s < %t/CoreKitClient.swiftinterface
|
||||
|
||||
// Test that we can rebuild it even when the "export as" module goes away.
|
||||
// RUN: %target-swift-frontend -build-module-from-parseable-interface -o %t/CoreKitClient.swiftmodule -I %S/Inputs/exported-module-name-after %t/CoreKitClient.swiftinterface
|
||||
// RUN: %target-swift-frontend -compile-module-from-interface -o %t/CoreKitClient.swiftmodule -I %S/Inputs/exported-module-name-after %t/CoreKitClient.swiftinterface
|
||||
|
||||
// CHECK: import CoreKit
|
||||
import CoreKit
|
||||
@@ -1,16 +1,16 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface %s
|
||||
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface %s
|
||||
// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix NONRESILIENT --check-prefix COMMON < %t.swiftinterface
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t-resilient.swiftinterface -enable-library-evolution %s
|
||||
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t-resilient.swiftinterface -enable-library-evolution %s
|
||||
// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix RESILIENT --check-prefix COMMON < %t-resilient.swiftinterface
|
||||
|
||||
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule %t.swiftinterface -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -module-name Test -emit-parseable-module-interface-path - | %FileCheck %s --check-prefix FROMMODULE --check-prefix NONRESILIENT --check-prefix COMMON
|
||||
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -module-name Test -emit-module-interface-path - | %FileCheck %s --check-prefix FROMMODULE --check-prefix NONRESILIENT --check-prefix COMMON
|
||||
|
||||
// RUN: %target-swift-frontend -emit-module -o %t/TestResilient.swiftmodule -enable-library-evolution %t-resilient.swiftinterface -disable-objc-attr-requires-foundation-module
|
||||
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/TestResilient.swiftmodule -module-name TestResilient -enable-library-evolution -emit-parseable-module-interface-path - | %FileCheck %s --check-prefix FROMMODULE --check-prefix RESILIENT --check-prefix COMMON
|
||||
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/TestResilient.swiftmodule -module-name TestResilient -enable-library-evolution -emit-module-interface-path - | %FileCheck %s --check-prefix FROMMODULE --check-prefix RESILIENT --check-prefix COMMON
|
||||
|
||||
// COMMON: @frozen public struct MyStruct {
|
||||
@frozen
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user