blob: df54f924ade90d60ffe9178ab924bbe78c4bf473 [file] [log] [blame]
// RUN: rm -rf %t && mkdir %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