mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This converts the instances of the pattern for which we have a proper substitution in lit. This will make it easier to replace it appropriately with Windows equivalents.
58 lines
2.0 KiB
Swift
58 lines
2.0 KiB
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-swift-frontend -index-store-path %t/idx %S/Inputs/SwiftModuleA.swift -emit-module -o %t/SwiftModuleA.swiftmodule
|
|
// RUN: %target-swift-frontend -index-store-path %t/idx %S/Inputs/SwiftModuleB.swift -emit-module -o %t/SwiftModuleB.swiftmodule -I %t
|
|
|
|
// RUN: echo 'import SwiftModuleA' > %t/s2.swift
|
|
// RUN: %target-swift-frontend -index-store-path %t/idx %s %t/s2.swift -c -o %t/s1.o -o %t/s2.o -I %t -emit-module -module-name main -emit-module-path %t/main.swiftmodule
|
|
|
|
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s
|
|
|
|
// XFAIL: linux
|
|
|
|
import SwiftModuleA
|
|
import SwiftModuleB
|
|
|
|
func test() {
|
|
funcSwiftA()
|
|
funcSwiftB()
|
|
}
|
|
|
|
// CHECK: [[MODA:SwiftModuleA.swiftmodule-[A-Z0-9]*]]
|
|
// CHECK: --------
|
|
// CHECK: has-main: 1
|
|
// CHECK: out-file: {{.*}}/SwiftModuleA.swiftmodule
|
|
// CHECK: DEPEND START
|
|
// CHECK: Unit | system | Swift | {{.*}}/Swift.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: DEPEND END
|
|
|
|
// CHECK: [[MODB:SwiftModuleB.swiftmodule-[A-Z0-9]*]]
|
|
// CHECK: --------
|
|
// CHECK: has-main: 1
|
|
// CHECK: out-file: {{.*}}/SwiftModuleB.swiftmodule
|
|
// CHECK: DEPEND START
|
|
// CHECK: Unit | system | Swift | {{.*}}/Swift.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: Unit | user | SwiftModuleA | {{.*}}/SwiftModuleA.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: DEPEND END
|
|
|
|
// CHECK-NOT: main.swiftmodule-
|
|
|
|
// CHECK: s1.o-
|
|
// CHECK: --------
|
|
// CHECK: has-main: 1
|
|
// CHECK: out-file: {{.*}}/s1.o
|
|
// CHECK: DEPEND START
|
|
// CHECK: Unit | system | Swift | {{.*}}/Swift.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: Unit | user | SwiftModuleA | {{.*}}/SwiftModuleA.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: Unit | user | SwiftModuleB | {{.*}}/SwiftModuleB.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: DEPEND END
|
|
|
|
// CHECK: s2.o-
|
|
// CHECK: --------
|
|
// CHECK: has-main: 1
|
|
// CHECK: out-file: {{.*}}/s2.o
|
|
// CHECK: DEPEND START
|
|
// CHECK: Unit | system | Swift | {{.*}}/Swift.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: Unit | user | SwiftModuleA | {{.*}}/SwiftModuleA.swiftmodule | | {{[0-9]*$}}
|
|
// CHECK: DEPEND END
|