File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -enable-objc-interop -emit-ir | %FileCheck -check-prefix CHECK -check-prefix CHECK-%target-ptrsize -check-prefix %target-cpu -DINT=i%target-ptrsize %s
2
2
3
+ // REQUIRE: objc_codegen
4
+
3
5
// rdar://16565958
4
6
5
7
import Builtin
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend -module-name cf_objc_retainAutoreleasedReturnValue -I %S/Inputs %s -enable-objc-interop -emit-ir | %FileCheck %s
2
- // RUN: %target-swift-frontend -module-name cf_objc_retainAutoreleasedReturnValue -I %S/Inputs %s -emit-ir | %FileCheck %s --check-prefix=NO_INTEROP
2
+
3
+ // We need to require objc_codegen to avoid this test on WASM.
4
+ // (That's why the other half of this test is in a separate file.)
5
+
6
+ // REQUIRES: objc_codegen
3
7
4
8
import CFBridgedType
5
9
@@ -10,15 +14,7 @@ public func foo() {
10
14
11
15
// With interop enabled, this should use objc_retainAutoreleasedReturnValue()
12
16
13
- // CHECK-LABEL: define protected swiftcc void @"$s37cf_objc_retainAutoreleasedReturnValue3fooyyF"()
17
+ // CHECK-LABEL: define {{.*}} swiftcc void @"$s37cf_objc_retainAutoreleasedReturnValue3fooyyF"()
14
18
// CHECK: entry:
15
19
// CHECK: %0 = call {{.*}}@returnsACFBridgedType()
16
20
// CHECK: %1 = notail call ptr @llvm.objc.retainAutoreleasedReturnValue(ptr %0)
17
-
18
- // Without interop, it should call swift_retain() instead.
19
-
20
- // NO_INTEROP-LABEL: define protected swiftcc void @"$s37cf_objc_retainAutoreleasedReturnValue3fooyyF"()
21
- // NO_INTEROP: entry:
22
- // NO_INTEROP: %0 = call {{.*}}@returnsACFBridgedType()
23
- // NO_INTEROP: %1 = call ptr @swift_retain(ptr returned %0)
24
-
You can’t perform that action at this time.
0 commit comments