File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ func test1() -> Int32 {
97
97
// CHECK: [[PTR:%.*]] = apply [[ACCESSOR]]({{%.*}}, [[A]]) : $@convention(method) (Int32, A) -> UnsafePointer<Int32>
98
98
// CHECK: [[T0:%.*]] = struct_extract [[PTR]] : $UnsafePointer<Int32>, #UnsafePointer._rawValue
99
99
// CHECK: [[T1:%.*]] = pointer_to_address [[T0]] : $Builtin.RawPointer to [strict] $*Int32
100
- // CHECK: [[MD:%.*]] = mark_dependence [nonescaping] [ [T1]] : $*Int32 on [[A]] : $A
100
+ // CHECK: [[MD:%.*]] = mark_dependence [[T1]] : $*Int32 on [[A]] : $A
101
101
// CHECK: [[ACCESS:%.*]] = begin_access [read] [unsafe] [[MD]] : $*Int32
102
102
// CHECK: [[T2:%.*]] = load [[ACCESS]] : $*Int32
103
103
// CHECK: return [[T2]] : $Int32
Original file line number Diff line number Diff line change @@ -95,10 +95,15 @@ func testSMod(s: inout S) {
95
95
mod ( & s. mutableData)
96
96
}
97
97
98
+ // Accessing s.data causes an escaping dependence because we don't extend the local access scope of 's'.
99
+ //
100
+ // TODO: could we notice the local access is already nested inside the same kind of access (modify) and consider this to
101
+ // be 'mark_dependence [nonescaping]'?
102
+ //
98
103
// CHECK-LABEL: sil hidden @$s4main16testSInoutBorrow5mut_syAA1SVz_tF : $@convention(thin) (@inout S) -> () {
99
104
// CHECK: [[ACCESS:%.*]] = begin_access [read] [static] %0
100
105
// CHECK: [[ADR:%.*]] = pointer_to_address %{{.*}} to [strict] $*NC
101
- // CHECK: [[MD:%.*]] = mark_dependence [nonescaping] [ [ADR]] on [[ACCESS]]
106
+ // CHECK: [[MD:%.*]] = mark_dependence [[ADR]] on [[ACCESS]]
102
107
// CHECK: begin_access [read] [unsafe] [[MD]]
103
108
// CHECK: apply
104
109
// CHECK: end_access
You can’t perform that action at this time.
0 commit comments