1
1
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=ONONE
2
- // R/UN : %target-swift-frontend -O -disable-llvm-optzns -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=ONONE
2
+ // RUN : %target-swift-frontend -O -disable-llvm-optzns -Xllvm -sil-disable-pass=FunctionSignatureOpts - emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=O
3
3
4
4
@_silgen_name ( " useMetadata " )
5
5
func useMetadata< T> ( _: T . Type )
@@ -25,7 +25,7 @@ private class PrivateNonfinal<T, U, V> {
25
25
26
26
// Methods in general on nonfinal classes cannot use the self metadata as
27
27
// is.
28
- // CHECK-LABEL: define {{.*}}15PrivateNonfinal{{.*}}buttsyyF"
28
+ // CHECK-LABEL: define {{.*}}15PrivateNonfinal{{.*}}buttsyyF{{.*}} "
29
29
@inline ( never)
30
30
final func butts( ) {
31
31
// CHECK: [[INSTANTIATED_TYPE_RESPONSE:%.*]] = call {{.*}} @{{.*}}15PrivateNonfinal{{.*}}Ma
@@ -46,19 +46,25 @@ private class PrivateNonfinal<T, U, V> {
46
46
// should figure out that it's effectively final because it has no
47
47
// subclasses.
48
48
private class PrivateNonfinalSubclass : PrivateNonfinal < Int , String , Float > {
49
+ // CHECK-O-LABEL: define {{.*}}PrivateNonfinalSubclass{{.*}}cfC
50
+ // CHECK-O: call {{.*}}@swift_allocObject(%swift.type* %0
51
+
49
52
@inline ( never)
50
53
final func borts( ) {
51
54
useMetadata ( PrivateNonfinalSubclass . self)
52
55
}
53
56
54
- // CHECK-LABEL: define {{.*}}PrivateNonfinalSubclass{{.*}}cfC
55
- // CHECK: call {{.*}}@swift_allocObject(%swift.type* %0
57
+ // CHECK-ONONE- LABEL: define {{.*}}PrivateNonfinalSubclass{{.*}}cfC
58
+ // CHECK-ONONE : call {{.*}}@swift_allocObject(%swift.type* %0
56
59
}
57
60
58
61
final private class FinalPrivateNonfinalSubclass < U> : PrivateNonfinal < U , String , Float > {
59
62
// The class is final, so we can always form metadata for
60
63
// FinalPrivateNonfinalSubclass<U> from the self argument.
61
64
65
+ // CHECK-O-LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}cfC"
66
+ // CHECK-O: call {{.*}}@swift_allocObject(%swift.type* %0
67
+
62
68
// CHECK-LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}burts
63
69
@inline ( never)
64
70
final func burts( ) {
@@ -71,10 +77,13 @@ final private class FinalPrivateNonfinalSubclass<U>: PrivateNonfinal<U, String,
71
77
useMetadata ( FinalPrivateNonfinalSubclass< Int> . self )
72
78
}
73
79
74
- // CHECK-LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}cfC"
75
- // CHECK: call {{.*}}@swift_allocObject(%swift.type* %0
80
+ // CHECK-ONONE- LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}cfC"
81
+ // CHECK-ONONE : call {{.*}}@swift_allocObject(%swift.type* %0
76
82
}
77
83
84
+ // CHECK-O-LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}cfC"
85
+ // CHECK-O: call {{.*}}@swift_allocObject(%swift.type* %0
86
+
78
87
final private class PrivateFinal < T, U, V> {
79
88
// The class is final, so we can always form metadata for
80
89
// PrivateFinal<T, U, V> from the self argument.
0 commit comments