Skip to content

Commit fb56178

Browse files
committed
[Test] Underscored canonicalize_borrow_scope.
Use underscores rather than hyphens so that text editors understand the name as a single word.
1 parent 0cad625 commit fb56178

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/SILOptimizer/Utils/CanonicalizeBorrowScope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ namespace swift::test {
860860
// Dumps:
861861
// - function after value canonicalization
862862
static FunctionTest CanonicalizeBorrowScopeTest(
863-
"canonicalize-borrow-scope",
863+
"canonicalize_borrow_scope",
864864
[](auto &function, auto &arguments, auto &test) {
865865
auto value = arguments.takeValue();
866866
auto borrowedValue = BorrowedValue(value);

test/SILOptimizer/canonicalize_borrow_scope_unit.sil

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ struct Unmanaged<Instance> where Instance : AnyObject {
1919
unowned(unsafe) var _value: @sil_unmanaged Instance
2020
}
2121

22-
// CHECK-LABEL: begin {{.*}} on copy_and_move_argument: canonicalize-borrow-scope
22+
// CHECK-LABEL: begin {{.*}} on copy_and_move_argument: canonicalize_borrow_scope
2323
// CHECK-LABEL: sil [ossa] @copy_and_move_argument : {{.*}} {
2424
// CHECK: {{bb[0-9]+}}([[INSTANCE:%[^,]+]] :
2525
// CHECK: [[UNMANAGED:%[^,]+]] = ref_to_unmanaged [[INSTANCE]]
2626
// CHECK: [[RETVAL:%[^,]+]] = struct $Unmanaged<Instance> ([[UNMANAGED]] : $@sil_unmanaged Instance)
2727
// CHECK: return [[RETVAL]]
2828
// CHECK-LABEL: } // end sil function 'copy_and_move_argument'
29-
// CHECK-LABEL: end {{.*}} on copy_and_move_argument: canonicalize-borrow-scope
29+
// CHECK-LABEL: end {{.*}} on copy_and_move_argument: canonicalize_borrow_scope
3030
sil [ossa] @copy_and_move_argument : $@convention(thin) <Instance where Instance : AnyObject> (@guaranteed Instance) -> Unmanaged<Instance> {
3131
bb0(%instance : @guaranteed $Instance):
32-
specify_test "canonicalize-borrow-scope @argument"
32+
specify_test "canonicalize_borrow_scope @argument"
3333
%copy_1 = copy_value %instance : $Instance
3434
%copy_2 = copy_value %copy_1 : $Instance
3535
%move = move_value %copy_2 : $Instance
@@ -44,17 +44,17 @@ bb0(%instance : @guaranteed $Instance):
4444
return %retval : $Unmanaged<Instance>
4545
}
4646

47-
// CHECK-LABEL: begin {{.*}} on copy_and_move_lexical_argument: canonicalize-borrow-scope
47+
// CHECK-LABEL: begin {{.*}} on copy_and_move_lexical_argument: canonicalize_borrow_scope
4848
// CHECK-LABEL: sil [ossa] @copy_and_move_lexical_argument : {{.*}} {
4949
// CHECK: {{bb[0-9]+}}([[INSTANCE:%[^,]+]] :
5050
// CHECK: [[UNMANAGED:%[^,]+]] = ref_to_unmanaged [[INSTANCE]]
5151
// CHECK: [[RETVAL:%[^,]+]] = struct $Unmanaged<Instance> ([[UNMANAGED]] : $@sil_unmanaged Instance)
5252
// CHECK: return [[RETVAL]]
5353
// CHECK-LABEL: } // end sil function 'copy_and_move_lexical_argument'
54-
// CHECK-LABEL: end {{.*}} on copy_and_move_lexical_argument: canonicalize-borrow-scope
54+
// CHECK-LABEL: end {{.*}} on copy_and_move_lexical_argument: canonicalize_borrow_scope
5555
sil [ossa] @copy_and_move_lexical_argument : $@convention(thin) <Instance where Instance : AnyObject> (@guaranteed Instance) -> Unmanaged<Instance> {
5656
bb0(%instance : @guaranteed $Instance):
57-
specify_test "canonicalize-borrow-scope @argument"
57+
specify_test "canonicalize_borrow_scope @argument"
5858
%copy_1 = copy_value %instance : $Instance
5959
%copy_2 = copy_value %copy_1 : $Instance
6060
%move = move_value [lexical] %copy_2 : $Instance
@@ -69,7 +69,7 @@ bb0(%instance : @guaranteed $Instance):
6969
return %retval : $Unmanaged<Instance>
7070
}
7171

72-
// CHECK-LABEL: begin running test {{.*}} on dont_rewrite_inner_forwarding_user: canonicalize-borrow-scope
72+
// CHECK-LABEL: begin running test {{.*}} on dont_rewrite_inner_forwarding_user: canonicalize_borrow_scope
7373
// CHECK-LABEL: sil [ossa] @dont_rewrite_inner_forwarding_user : {{.*}} {
7474
// CHECK: [[GET_C:%[^,]+]] = function_ref @getD
7575
// CHECK: [[TAKE_C:%[^,]+]] = function_ref @takeC
@@ -84,12 +84,12 @@ bb0(%instance : @guaranteed $Instance):
8484
// CHECK: destroy_value [[C]]
8585
// CHECK: return [[OUTER_UPCAST]]
8686
// CHECK-LABEL: } // end sil function 'dont_rewrite_inner_forwarding_user'
87-
// CHECK-LABEL: end running test {{.*}} on dont_rewrite_inner_forwarding_user: canonicalize-borrow-scope
87+
// CHECK-LABEL: end running test {{.*}} on dont_rewrite_inner_forwarding_user: canonicalize_borrow_scope
8888
sil [ossa] @dont_rewrite_inner_forwarding_user : $@convention(thin) () -> (@owned C) {
8989
%getD = function_ref @getD : $@convention(thin) () -> (@owned D)
9090
%takeC = function_ref @takeC : $@convention(thin) (@owned C) -> ()
9191
%d = apply %getD() : $@convention(thin) () -> (@owned D)
92-
specify_test "canonicalize-borrow-scope @instruction"
92+
specify_test "canonicalize_borrow_scope @instruction"
9393
%b = begin_borrow %d : $D
9494
%c2 = copy_value %b : $D
9595
%u2 = upcast %c2 : $D to $C
@@ -101,7 +101,7 @@ sil [ossa] @dont_rewrite_inner_forwarding_user : $@convention(thin) () -> (@owne
101101
return %u2 : $C
102102
}
103103

104-
// CHECK-LABEL: begin running test {{.*}} on dont_hoist_inner_destructure: canonicalize-borrow-scope
104+
// CHECK-LABEL: begin running test {{.*}} on dont_hoist_inner_destructure: canonicalize_borrow_scope
105105
// CHECK-LABEL: sil [ossa] @dont_hoist_inner_destructure : {{.*}} {
106106
// CHECK: {{bb[0-9]+}}([[S:%[^,]+]] :
107107
// CHECK: [[OUTER_COPY:%[^,]+]] = copy_value [[S]]
@@ -123,10 +123,10 @@ sil [ossa] @dont_rewrite_inner_forwarding_user : $@convention(thin) () -> (@owne
123123
// CHECK: br [[EXIT]]
124124
// CHECK: [[EXIT]]:
125125
// CHECK-LABEL: } // end sil function 'dont_hoist_inner_destructure'
126-
// CHECK-LABEL: end running test {{.*}} on dont_hoist_inner_destructure: canonicalize-borrow-scope
126+
// CHECK-LABEL: end running test {{.*}} on dont_hoist_inner_destructure: canonicalize_borrow_scope
127127
sil [ossa] @dont_hoist_inner_destructure : $@convention(thin) (@owned S) -> () {
128128
entry(%s : @owned $S):
129-
specify_test "canonicalize-borrow-scope @instruction"
129+
specify_test "canonicalize_borrow_scope @instruction"
130130
%s_borrow = begin_borrow %s : $S
131131
%s_copy = copy_value %s_borrow : $S
132132
cond_br undef, left, right

0 commit comments

Comments
 (0)