|
1 | 1 | // REQUIRES: OS=macosx
|
2 | 2 | // RUN: %empty-directory(%t)
|
3 | 3 |
|
4 |
| -// RUN: %target-swift-frontend -typecheck %s -emit-tbd -emit-tbd-path %t/before_move.tbd -D BEFORE_MOVE -module-name Foo -enable-library-evolution |
| 4 | +// RUN: %target-swift-frontend -typecheck %s -emit-tbd -emit-tbd-path %t/before_move.tbd -D BEFORE_MOVE -module-name Foo -enable-library-evolution -emit-sil -o %t/before_move.sil |
5 | 5 | // RUN: %FileCheck %s < %t/before_move.tbd
|
| 6 | +// RUN: %FileCheck %s --check-prefix=CHECK-SIL < %t/before_move.sil |
6 | 7 |
|
7 | 8 | // RUN: %target-swift-frontend %s -emit-module -emit-module-path %t/FooCore.swiftmodule -D AFTER_MOVE_FOO_CORE -module-name FooCore -enable-library-evolution
|
8 |
| -// RUN: %target-swift-frontend -typecheck %s -emit-tbd -emit-tbd-path %t/after_move.tbd -D AFTER_MOVE_FOO -module-name Foo -I %t -enable-library-evolution |
| 9 | +// RUN: %target-swift-frontend -typecheck %s -emit-tbd -emit-tbd-path %t/after_move.tbd -D AFTER_MOVE_FOO -module-name Foo -I %t -enable-library-evolution -emit-sil -o %t/after_move.sil |
9 | 10 | // RUN: %FileCheck %s < %t/after_move.tbd
|
| 11 | +// RUN: %FileCheck %s --check-prefix=CHECK-SIL < %t/after_move.sil |
10 | 12 |
|
11 | 13 | // CHECK: '_$s3Foo4DateC14getCurrentYearSiyFZ'
|
12 | 14 | // CHECK: '_$s3Foo9DateValueV4yearACSi_tcfC'
|
13 | 15 | // CHECK: '_$s3Foo9DateValueV4yearSivg'
|
14 |
| -// CHECK: '_$s3Foo9DateValueV4yearSivpMV' |
| 16 | + |
| 17 | +// CHECK-SIL: sil [available 10.7] @$s3Foo4DateC14getCurrentYearSiyFZ : $@convention(method) (@thick Date.Type) -> Int |
| 18 | +// CHECK-SIL: sil [available 10.7] @$s3Foo9DateValueV4yearACSi_tcfC : $@convention(method) (Int, @thin DateValue.Type) -> @out DateValue |
| 19 | +// CHECK-SIL: sil [available 10.7] @$s3Foo9DateValueV4yearSivg : $@convention(method) (@in_guaranteed DateValue) -> Int |
15 | 20 |
|
16 | 21 | #if BEFORE_MOVE
|
17 | 22 |
|
| 23 | +@available(OSX 10.7, *) |
18 | 24 | public class Date {
|
19 | 25 | public static func getCurrentYear() -> Int { return 2020 }
|
20 | 26 | }
|
21 | 27 |
|
| 28 | +@available(OSX 10.7, *) |
22 | 29 | public struct DateValue {
|
23 | 30 | public init(year: Int) {}
|
24 | 31 | public var year: Int { return 2020 }
|
@@ -47,7 +54,7 @@ public extension Date {
|
47 | 54 | }
|
48 | 55 |
|
49 | 56 | public extension DateValue {
|
50 |
| - public init(year: Int) {} |
| 57 | + public init(year: Int) { self.init(year: 2020) } |
51 | 58 | public var year: Int { return 2020 }
|
52 | 59 | }
|
53 | 60 |
|
|
0 commit comments