2828 return %2 : $()
2929}
3030
31- sil [ossa] [always_inline] @callee_begin_borrow_lexical : $@convention(thin) () -> () {
31+ sil [ossa] [always_inline] @callee_begin_borrow : $@convention(thin) () -> () {
3232 %instance = alloc_ref $X
3333 %guaranteed_c = begin_borrow [lexical] %instance : $X
3434 end_borrow %guaranteed_c : $X
35+ %guaranteed_c2 = begin_borrow [pointer_escape] %instance : $X
36+ end_borrow %guaranteed_c2 : $X
3537 destroy_value %instance : $X
3638 %res = tuple ()
3739 return %res : $()
3840}
3941
4042// CHECK-LABEL: sil [ossa] @caller_begin_borrow_lexical
4143// CHECK: begin_borrow [lexical]
44+ // CHECK: begin_borrow [pointer_escape]
4245// CHECK-LABEL: } // end sil function 'caller_begin_borrow_lexical'
4346sil [ossa] @caller_begin_borrow_lexical : $@convention(thin) () -> () {
44- %callee_begin_borrow_lexical = function_ref @callee_begin_borrow_lexical : $@convention(thin) () -> ()
47+ %callee_begin_borrow_lexical = function_ref @callee_begin_borrow : $@convention(thin) () -> ()
4548 %res = apply %callee_begin_borrow_lexical() : $@convention(thin) () -> ()
4649 return %res : $()
4750}
@@ -77,7 +80,8 @@ entry(%0 : @owned $Builtin.NativeObject):
7780 %2 = move_value [allows_diagnostics] %1 : $Builtin.NativeObject
7881 %3 = move_value [lexical] %2 : $Builtin.NativeObject
7982 %4 = move_value [allows_diagnostics] [lexical] %3 : $Builtin.NativeObject
80- return %4 : $Builtin.NativeObject
83+ %5 = move_value [pointer_escape] %4 : $Builtin.NativeObject
84+ return %5 : $Builtin.NativeObject
8185}
8286
8387// CHECK-LABEL: sil [ossa] @caller_move_value {{.*}} {
@@ -86,7 +90,8 @@ entry(%0 : @owned $Builtin.NativeObject):
8690// CHECK: [[REGISTER_2:%[^,]+]] = move_value [allows_diagnostics] [[REGISTER_1]]
8791// CHECK: [[REGISTER_3:%[^,]+]] = move_value [lexical] [[REGISTER_2]]
8892// CHECK: [[REGISTER_4:%[^,]+]] = move_value [allows_diagnostics] [lexical] [[REGISTER_3]]
89- // CHECK: return [[REGISTER_4]]
93+ // CHECK: [[REGISTER_5:%[^,]+]] = move_value [pointer_escape] [[REGISTER_4]]
94+ // CHECK: return [[REGISTER_5]]
9095// CHECK-LABEL: } // end sil function 'caller_move_value'
9196sil [ossa] @caller_move_value : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
9297entry(%0 : @owned $Builtin.NativeObject):
0 commit comments