File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,14 @@ extension ContiguousArray : ContiguousBytes {}
57
57
func takesPointer( _ p: UnsafeRawBufferPointer ) { }
58
58
59
59
// In specialized testWithUnsafeBytes<A>(_:), the conditional case and call to withUnsafeBytes must be eliminated.
60
+ // Normally, we expect Array.withUnsafeBytes to be inlined so we would see:
61
+ // [[TAKES_PTR:%.*]] = function_ref @$s30devirt_specialized_conformance12takesPointeryySWF : $@convention(thin) (UnsafeRawBufferPointer) -> ()
62
+ // apply [[TAKES_PTR]](%{{.*}}) : $@convention(thin) (UnsafeRawBufferPointer) -> ()
63
+ // But the inlining isn't consistent across builds with and without debug info.
64
+ //
60
65
// CHECK-LABEL: sil shared [noinline] @$s30devirt_specialized_conformance19testWithUnsafeBytesyyxlFSayypG_Tg5 : $@convention(thin) (@guaranteed Array<Any>) -> () {
61
66
// CHECK: bb0
62
67
// CHECK-NOT: witness_method
63
- // CHECK: [[TAKES_PTR:%.*]] = function_ref @$s30devirt_specialized_conformance12takesPointeryySWF : $@convention(thin) (UnsafeRawBufferPointer) -> ()
64
- // CHECK: apply [[TAKES_PTR]](%{{.*}}) : $@convention(thin) (UnsafeRawBufferPointer) -> ()
65
68
// CHECK-LABEL: } // end sil function '$s30devirt_specialized_conformance19testWithUnsafeBytesyyxlFSayypG_Tg5'
66
69
@inline ( never)
67
70
func testWithUnsafeBytes< T> ( _ t: T ) {
You can’t perform that action at this time.
0 commit comments