Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IRGen][Test] Update tests for non-Linux platform support.
Tweak the tests slightly for WASM, Windows and Darwin. rdar://23335318
- Loading branch information
Showing
3 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// RUN: %target-swift-frontend -module-name cf_objc_retainAutoreleasedReturnValue -I %S/Inputs %s -disable-objc-interop -emit-ir | %FileCheck %s | ||
|
||
// This is in a separate file because *this* one works on WASM. | ||
// (cf_objc_retainAutoreleasedReturnValue.swift does not.) | ||
|
||
import CFBridgedType | ||
|
||
@inline(never) | ||
public func foo() { | ||
let _ = returnsACFBridgedType() | ||
} | ||
|
||
// With interop disabled, this should use swift_retain(). | ||
|
||
// CHECK-LABEL: define {{.*}}swiftcc void @"$s37cf_objc_retainAutoreleasedReturnValue3fooyyF"() | ||
// CHECK: entry: | ||
// CHECK: %0 = call {{.*}}@returnsACFBridgedType() | ||
// CHECK: %1 = call ptr @swift_retain(ptr returned %0) |