Skip to content

Fix objc_direct test that was failing on watchOS #62601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions test/IRGen/objc_direct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

// REQUIRES: objc_interop

// rdar://103369740 #62183
// UNSUPPORTED: OS=watchos

func markUsed<T>(_ t: T) {}

protocol BarProtocol {
Expand All @@ -15,9 +12,9 @@ extension Bar: BarProtocol {}

let bar = Bar()
markUsed(Bar(value: 0))
// CHECK: call swiftcc i64 @"$sSo3BarC5valueABSgs5Int32V_tcfC"
// CHECK: call swiftcc {{i32|i64}} @"$sSo3BarC5valueABSgs5Int32V_tcfC"
markUsed(Bar.init(value: 0))
// CHECK: call swiftcc i64 @"$sSo3BarC5valueABSgs5Int32V_tcfC"
// CHECK: call swiftcc {{i32|i64}} @"$sSo3BarC5valueABSgs5Int32V_tcfC"

bar.directProperty = 123
// CHECK: call void @"\01-[Bar setDirectProperty:]"({{.*}}, i8* undef, i32 {{.*}})
Expand Down Expand Up @@ -60,8 +57,8 @@ markUsed(Bar.directClassMethod2())
markUsed(bar.directProtocolMethod())
// CHECK: call {{.*}} @"\01-[Bar directProtocolMethod]"({{.*}}, i8* undef)

// CHECK: define {{.*}} swiftcc i64 @"$sSo3BarC5valueABSgs5Int32V_tcfC"
// CHECK: call swiftcc i64 @"$sSo3BarC5valueABSgs5Int32V_tcfcTO"
// CHECK: define {{.*}} swiftcc {{i32|i64}} @"$sSo3BarC5valueABSgs5Int32V_tcfC"
// CHECK: call swiftcc {{i32|i64}} @"$sSo3BarC5valueABSgs5Int32V_tcfcTO"
// CHECK: }

// CHECK-DAG: declare i32 @"\01-[Bar directProperty]"
Expand All @@ -76,6 +73,6 @@ markUsed(bar.directProtocolMethod())
// CHECK-DAG: declare {{.*}} @"\01+[Bar directClassMethod2]"
// CHECK-DAG: declare {{.*}} @"\01-[Bar directProtocolMethod]"

// CHECK: define {{.*}} swiftcc i64 @"$sSo3BarC5valueABSgs5Int32V_tcfcTO"
// CHECK: define {{.*}} swiftcc {{i32|i64}} @"$sSo3BarC5valueABSgs5Int32V_tcfcTO"
// CHECK: call {{.*}} @"\01-[Bar initWithValue:]"
// CHECK: }