Skip to content

Commit c1bed74

Browse files
committed
Fix deinit_recursive test by using non-trivial type for elem
1 parent d61e386 commit c1bed74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/SILGen/deinit_recursive.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
22

33
class Node {
4-
var elem: Int64
4+
var elem: [Int64] = []
55
var next: Node?
66
}
77

88
// CHECK: sil hidden [ossa] @$s16deinit_recursive4NodeCfd : $@convention(method) (@guaranteed Node) -> @owned Builtin.NativeObject {
99
// CHECK: [[SELF:%.*]] "self"
1010
// CHECK: bb0([[SELF]] : @guaranteed $Node):
1111
// CHECK: [[ELEM:%.*]] = ref_element_addr [[SELF]] : $Node, #Node.elem
12-
// CHECK: [[ELEM_ACCESS:%.*]] = begin_access [deinit] [static] [[ELEM]] : $*Int64
13-
// CHECK: destroy_addr [[ELEM_ACCESS]] : $*Int64
14-
// CHECK: end_access [[ELEM_ACCESS]] : $*Int64
12+
// CHECK: [[ELEM_ACCESS:%.*]] = begin_access [deinit] [static] [[ELEM]] : $*Array<Int64>
13+
// CHECK: destroy_addr [[ELEM_ACCESS]] : $*Array<Int64>
14+
// CHECK: end_access [[ELEM_ACCESS]] : $*Array<Int64>
1515
// CHECK: [[NIL:%.*]] = enum $Optional<Node>, #Optional.none!enumelt
1616
// CHECK: [[SELF_NEXT:%.*]] = ref_element_addr [[SELF]] : $Node, #Node.next
1717
// CHECK: [[ITER:%.*]] = alloc_stack $Optional<Node>

0 commit comments

Comments
 (0)