Skip to content

Commit cbdcc5e

Browse files
committed
[Test] Enabled RUN line.
The test had its run line disabled because there are some for-its-purposes-irrelevant differences between O and Onone, specifically in the ordering of functions. Suppress one of those differences by disabling FSO (because duplicating those check lines would be noisy and harder to see) and check the other difference (because there are only two lines being checked and they move little. rdar://91431244
1 parent 43d9901 commit cbdcc5e

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

test/IRGen/exact_self_class_metadata_peephole.swift

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// 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
33

44
@_silgen_name("useMetadata")
55
func useMetadata<T>(_: T.Type)
@@ -25,7 +25,7 @@ private class PrivateNonfinal<T, U, V> {
2525

2626
// Methods in general on nonfinal classes cannot use the self metadata as
2727
// is.
28-
// CHECK-LABEL: define {{.*}}15PrivateNonfinal{{.*}}buttsyyF"
28+
// CHECK-LABEL: define {{.*}}15PrivateNonfinal{{.*}}buttsyyF{{.*}}"
2929
@inline(never)
3030
final func butts() {
3131
// CHECK: [[INSTANTIATED_TYPE_RESPONSE:%.*]] = call {{.*}} @{{.*}}15PrivateNonfinal{{.*}}Ma
@@ -46,19 +46,25 @@ private class PrivateNonfinal<T, U, V> {
4646
// should figure out that it's effectively final because it has no
4747
// subclasses.
4848
private class PrivateNonfinalSubclass: PrivateNonfinal<Int, String, Float> {
49+
// CHECK-O-LABEL: define {{.*}}PrivateNonfinalSubclass{{.*}}cfC
50+
// CHECK-O: call {{.*}}@swift_allocObject(%swift.type* %0
51+
4952
@inline(never)
5053
final func borts() {
5154
useMetadata(PrivateNonfinalSubclass.self)
5255
}
5356

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
5659
}
5760

5861
final private class FinalPrivateNonfinalSubclass<U>: PrivateNonfinal<U, String, Float> {
5962
// The class is final, so we can always form metadata for
6063
// FinalPrivateNonfinalSubclass<U> from the self argument.
6164

65+
// CHECK-O-LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}cfC"
66+
// CHECK-O: call {{.*}}@swift_allocObject(%swift.type* %0
67+
6268
// CHECK-LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}burts
6369
@inline(never)
6470
final func burts() {
@@ -71,10 +77,13 @@ final private class FinalPrivateNonfinalSubclass<U>: PrivateNonfinal<U, String,
7177
useMetadata(FinalPrivateNonfinalSubclass<Int>.self)
7278
}
7379

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
7682
}
7783

84+
// CHECK-O-LABEL: define {{.*}}FinalPrivateNonfinalSubclass{{.*}}cfC"
85+
// CHECK-O: call {{.*}}@swift_allocObject(%swift.type* %0
86+
7887
final private class PrivateFinal<T, U, V> {
7988
// The class is final, so we can always form metadata for
8089
// PrivateFinal<T, U, V> from the self argument.

0 commit comments

Comments
 (0)