28
28
return %2 : $()
29
29
}
30
30
31
- sil [ossa] [always_inline] @callee_begin_borrow_lexical : $@convention(thin) () -> () {
31
+ sil [ossa] [always_inline] @callee_begin_borrow : $@convention(thin) () -> () {
32
32
%instance = alloc_ref $X
33
33
%guaranteed_c = begin_borrow [lexical] %instance : $X
34
34
end_borrow %guaranteed_c : $X
35
+ %guaranteed_c2 = begin_borrow [pointer_escape] %instance : $X
36
+ end_borrow %guaranteed_c2 : $X
35
37
destroy_value %instance : $X
36
38
%res = tuple ()
37
39
return %res : $()
38
40
}
39
41
40
42
// CHECK-LABEL: sil [ossa] @caller_begin_borrow_lexical
41
43
// CHECK: begin_borrow [lexical]
44
+ // CHECK: begin_borrow [pointer_escape]
42
45
// CHECK-LABEL: } // end sil function 'caller_begin_borrow_lexical'
43
46
sil [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) () -> ()
45
48
%res = apply %callee_begin_borrow_lexical() : $@convention(thin) () -> ()
46
49
return %res : $()
47
50
}
@@ -77,7 +80,8 @@ entry(%0 : @owned $Builtin.NativeObject):
77
80
%2 = move_value [allows_diagnostics] %1 : $Builtin.NativeObject
78
81
%3 = move_value [lexical] %2 : $Builtin.NativeObject
79
82
%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
81
85
}
82
86
83
87
// CHECK-LABEL: sil [ossa] @caller_move_value {{.*}} {
@@ -86,7 +90,8 @@ entry(%0 : @owned $Builtin.NativeObject):
86
90
// CHECK: [[REGISTER_2:%[^,]+]] = move_value [allows_diagnostics] [[REGISTER_1]]
87
91
// CHECK: [[REGISTER_3:%[^,]+]] = move_value [lexical] [[REGISTER_2]]
88
92
// 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]]
90
95
// CHECK-LABEL: } // end sil function 'caller_move_value'
91
96
sil [ossa] @caller_move_value : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
92
97
entry(%0 : @owned $Builtin.NativeObject):
0 commit comments