@@ -567,21 +567,36 @@ extension _ArrayBuffer {
567567 }
568568 }
569569
570+ // Superseded by the typed-throws version of this function, but retained
571+ // for ABI reasons.
572+ @inlinable
573+ @_silgen_name ( " $ss12_ArrayBufferV010withUnsafeB7Pointeryqd__qd__SRyxGKXEKlF " )
574+ internal func __abi_withUnsafeBufferPointer< R> (
575+ _ body: ( UnsafeBufferPointer < Element > ) throws -> R
576+ ) rethrows -> R {
577+ if _fastPath ( _isNative) {
578+ defer { _fixLifetime ( self ) }
579+ return try body (
580+ UnsafeBufferPointer ( start: firstElementAddress, count: count) )
581+ }
582+ return try ContiguousArray ( self ) . withUnsafeBufferPointer ( body)
583+ }
584+
570585 /// Call `body(p)`, where `p` is an `UnsafeBufferPointer` over the
571586 /// underlying contiguous storage. If no such storage exists, it is
572587 /// created on-demand.
573588 @inlinable
574- internal func withUnsafeBufferPointer< R> (
575- _ body: ( UnsafeBufferPointer < Element > ) throws -> R
576- ) rethrows -> R {
589+ internal func withUnsafeBufferPointer< R, E > (
590+ _ body: ( UnsafeBufferPointer < Element > ) throws ( E ) -> R
591+ ) throws ( E ) -> R {
577592 if _fastPath ( _isNative) {
578593 defer { _fixLifetime ( self ) }
579594 return try body (
580595 UnsafeBufferPointer ( start: firstElementAddress, count: count) )
581596 }
582597 return try ContiguousArray ( self ) . withUnsafeBufferPointer ( body)
583598 }
584-
599+
585600 /// Call `body(p)`, where `p` is an `UnsafeMutableBufferPointer`
586601 /// over the underlying contiguous storage.
587602 ///
0 commit comments