mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
20 lines
667 B
Plaintext
20 lines
667 B
Plaintext
// RUN: %swift -swift-version 4 -target arm64e-apple-ios12.0 -parse-stdlib -parse-as-library %s -emit-ir -module-name test | %FileCheck %s --check-prefix=CHECK
|
|
|
|
// REQUIRES: CPU=arm64e
|
|
// REQUIRES: OS=ios
|
|
|
|
import Builtin
|
|
|
|
sil @global_function : $@convention(thin) () -> ()
|
|
|
|
sil @test_retain : $@convention(thin) (@guaranteed Builtin.NativeObject) -> (@owned Builtin.NativeObject) {
|
|
bb0(%0 : $Builtin.NativeObject):
|
|
strong_retain %0 : $Builtin.NativeObject
|
|
return %0 : $Builtin.NativeObject
|
|
}
|
|
// CHECK-LABEL: define swiftcc ptr @test_retain(ptr %0)
|
|
// CHECK: call ptr @swift_retain(
|
|
// CHECK-NEXT: ret ptr %0
|
|
|
|
// CHECK: declare ptr @swift_retain(ptr returned
|