blob: 1b6fe1f4b818feabcfdcb5deea6e90f2359c8795 [file] [log] [blame]
// First parse this and then emit a *.sib. Then read in the *.sib, then recreate
// RUN: %empty-directory(%t)
// RUN: %target-sil-opt %s -emit-sib -o %t/tmp.sib -module-name borrow
// RUN: %target-sil-opt %t/tmp.sib -o %t/tmp.2.sib -module-name borrow
// RUN: %target-sil-opt %t/tmp.2.sib -module-name borrow | %FileCheck %s
sil_stage canonical
import Builtin
// CHECK-LABEL: sil [serialized] [ossa] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
// CHECK: bb1([[PHIBBARG:%.*]] : @guaranteed $Builtin.NativeObject):
// CHECK: end_borrow [[PHIBBARG]] : $Builtin.NativeObject
sil [serialized] [ossa] @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 %1 : $Builtin.NativeObject
%4 = tuple()
return %4 : $()
}