File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed
test/SIL/ownership-verifier Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -123,23 +123,6 @@ bb0(%0 : @owned $Builtin.NativeObject):
123
123
return %9999 : $()
124
124
}
125
125
126
- // CHECK-LABEL: Error#: 0. Begin Error in Function: 'recursive_interior_pointer_error'
127
- // CHECK-NEXT: Found outside of lifetime use?!
128
- // CHECK-NEXT: Value: %2 = begin_borrow %0 : $KlassUser
129
- // CHECK-NEXT: Consuming User: end_borrow %2 : $KlassUser
130
- // CHECK-NEXT: Non Consuming User: %6 = load [copy] %3 : $*Klass
131
- // CHECK-NEXT: Block: bb0
132
- // CHECK: Error#: 0. End Error in Function: 'recursive_interior_pointer_error'
133
- sil [ossa] @recursive_interior_pointer_error : $@convention(thin) (@owned KlassUser, @guaranteed Klass) -> @owned Klass {
134
- bb0(%0 : @owned $KlassUser, %0a : @guaranteed $Klass):
135
- %1 = begin_borrow %0 : $KlassUser
136
- %2 = ref_tail_addr %1 : $KlassUser, $Klass
137
- end_borrow %1 : $KlassUser
138
- destroy_value %0 : $KlassUser
139
- %3 = load [copy] %2 : $*Klass
140
- return %3 : $Klass
141
- }
142
-
143
126
// CHECK-LABEL: Error#: 0. Begin Error in Function: 'open_existential_box_interior_pointer_error'
144
127
// CHECK-NEXT: Found outside of lifetime use?!
145
128
// CHECK-NEXT: Value: %1 = begin_borrow %0 : $Error // users: %3, %2
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ bb0(%0 : @owned $WrapperStruct):
51
51
return %res : $()
52
52
}
53
53
54
+ // Note: The MemoryLifetimeVerifier will also report an error for this function. Therefore
55
+ // we run sil-opt with -dont-abort-on-memory-lifetime-error.
56
+
54
57
// CHECK-LABEL: Begin Error in function caller2
55
58
// CHECK: SIL verification failed: Found load borrow that is invalidated by a local write?!: loadBorrowImmutabilityAnalysis.isImmutable(LBI)
56
59
// CHECK-LABEL: End Error in function caller2
You can’t perform that action at this time.
0 commit comments