mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
24 lines
1006 B
Plaintext
24 lines
1006 B
Plaintext
// First parse this and then emit a *.sib. Then read in the *.sib, then recreate
|
|
// RUN: rm -rfv %t
|
|
// RUN: mkdir %t
|
|
// RUN: %target-sil-opt -enable-sil-ownership %s -emit-sib -o %t/tmp.sib -module-name borrow
|
|
// RUN: %target-sil-opt -enable-sil-ownership %t/tmp.sib -o %t/tmp.2.sib -module-name borrow
|
|
// RUN: %target-sil-opt -enable-sil-ownership %t/tmp.2.sib -module-name borrow | %FileCheck %s
|
|
|
|
sil_stage canonical
|
|
|
|
import Builtin
|
|
|
|
// CHECK-LABEL: sil [serialized] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
|
|
// CHECK: bb1([[PHIBBARG:%.*]] : @guaranteed $Builtin.NativeObject):
|
|
// CHECK: end_borrow_argument [[PHIBBARG]] : $Builtin.NativeObject
|
|
sil [serialized] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
|
|
bb0(%0 : @guaranteed $Builtin.NativeObject):
|
|
br bb1(%0 : $Builtin.NativeObject)
|
|
|
|
bb1(%1 : @guaranteed $Builtin.NativeObject):
|
|
end_borrow_argument %1 : $Builtin.NativeObject
|
|
%4 = tuple()
|
|
return %4 : $()
|
|
}
|