Files
swift-mirror/test/SILGen/witness_tables_multifile.swift
Michael Gottesman 9e13779702 [ownership] Remove most -enable-sil-ownership from SILGen now that %target-swift-emit-silgen does it automatically.
I did this using a sed pattern and verified by hand that I was only touching
target-swift-emit-silgen lines.
2018-12-13 11:54:54 -08:00

24 lines
1.5 KiB
Swift

// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/witness_tables_multifile_2.swift | %FileCheck %s -allow-deprecated-dag-overlap -check-prefix=CHECK-FIRST-FILE
// RUN: %target-swift-emit-silgen %s -primary-file %S/Inputs/witness_tables_multifile_2.swift | %FileCheck %S/Inputs/witness_tables_multifile_2.swift -check-prefix=CHECK-SECOND-FILE
protocol InheritsFooable : Fooable {}
// CHECK-FIRST-FILE-NOT: sil_witness_table hidden FooStruct: Fooable module witness_tables_multifile
// CHECK-FIRST-FILE-DAG: sil_witness_table hidden FooStruct: InheritsFooable module witness_tables_multifile
// CHECK-FIRST-FILE-NOT: sil_witness_table hidden FooStruct: Fooable module witness_tables_multifile
struct FooStruct : InheritsFooable {}
// CHECK-FIRST-FILE-DAG: sil_witness_table hidden FooStruct2: Fooable module witness_tables_multifile
// CHECK-FIRST-FILE-DAG: sil_witness_table hidden FooStruct2: InheritsFooable module witness_tables_multifile
// CHECK-FIRST-FILE-NOT: sil_witness_table hidden FooStruct2: InheritsFooable2 module witness_tables_multifile
struct FooStruct2 : InheritsFooable { }
// CHECK-FIRST-FILE-DAG: sil_witness_table hidden FooStruct3: InheritsFooable2 module witness_tables_multifile
// CHECK-FIRST-FILE-DAG: sil_witness_table hidden FooStruct3: Fooable module witness_tables_multifile
// CHECK-FIRST-FILE-DAG: sil_witness_table hidden FooStruct3: InheritsFooable2 module witness_tables_multifile
struct FooStruct3 : InheritsFooable { }
extension FooStruct3 : InheritsFooable2 {
func foo() { }
}