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 {}
5757func takesPointer( _ p: UnsafeRawBufferPointer ) { }
5858
5959// 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+ //
6065// CHECK-LABEL: sil shared [noinline] @$s30devirt_specialized_conformance19testWithUnsafeBytesyyxlFSayypG_Tg5 : $@convention(thin) (@guaranteed Array<Any>) -> () {
6166// CHECK: bb0
6267// CHECK-NOT: witness_method
63- // CHECK: [[TAKES_PTR:%.*]] = function_ref @$s30devirt_specialized_conformance12takesPointeryySWF : $@convention(thin) (UnsafeRawBufferPointer) -> ()
64- // CHECK: apply [[TAKES_PTR]](%{{.*}}) : $@convention(thin) (UnsafeRawBufferPointer) -> ()
6568// CHECK-LABEL: } // end sil function '$s30devirt_specialized_conformance19testWithUnsafeBytesyyxlFSayypG_Tg5'
6669@inline ( never)
6770func testWithUnsafeBytes< T> ( _ t: T ) {
You can’t perform that action at this time.
0 commit comments