@@ -192,7 +192,6 @@ extension Unsafe${Mutable}RawBufferPointer: Sequence {
192
192
///
193
193
/// - Returns: an iterator over any remaining elements of `self` and the
194
194
/// number of elements copied.
195
- @inlinable // unsafe-performance
196
195
@_alwaysEmitIntoClient
197
196
public func _copyContents(
198
197
initializing destination: UnsafeMutableBufferPointer < UInt8 >
@@ -406,7 +405,7 @@ extension Unsafe${Mutable}RawBufferPointer {
406
405
return baseAddress!. load ( fromByteOffset: offset, as: T . self)
407
406
}
408
407
409
- // FIXME(NCG): Add a consuming analogue of `load`, like `move(fromByteOffset:as:_:)`
408
+ // FIXME(NCG): Add a consuming analogue of `load`, like `move(fromByteOffset:as:_:)` (in the mutable variant)
410
409
// FIXME(NCG): Add a borrow analogue of `load`, like `withBorrow(fromByteOffset:as:_:)`
411
410
412
411
/// Returns a new instance of the given type, constructed from the raw memory
@@ -498,7 +497,6 @@ extension Unsafe${Mutable}RawBufferPointer {
498
497
/// - type: The type to use for the newly constructed instance. The memory
499
498
/// must be initialized to a value of a type that is layout compatible
500
499
/// with `type`.
501
- @inlinable
502
500
@_alwaysEmitIntoClient
503
501
// This custom silgen name is chosen to not interfere with the old ABI
504
502
@_silgen_name ( " _swift_se0349_UnsafeMutableRawBufferPointer_storeBytes " )
@@ -853,7 +851,6 @@ extension Unsafe${Mutable}RawBufferPointer {
853
851
/// - Returns: A typed buffer referencing the initialized elements.
854
852
/// The returned buffer references memory starting at the same
855
853
/// base address as this buffer, and its count is equal to `source.count`
856
- @inlinable
857
854
@_alwaysEmitIntoClient
858
855
public func initializeMemory< C: Collection > (
859
856
as type: C . Element . Type ,
@@ -942,7 +939,6 @@ extension Unsafe${Mutable}RawBufferPointer {
942
939
/// The returned buffer references memory starting at the same
943
940
/// base address as this buffer, and its count is equal to `source.count`.
944
941
@discardableResult
945
- @inlinable
946
942
@_alwaysEmitIntoClient
947
943
public func moveInitializeMemory< T: ~ Copyable> (
948
944
as type: T . Type ,
@@ -1085,9 +1081,8 @@ extension Unsafe${Mutable}RawBufferPointer {
1085
1081
/// the return value for the `withMemoryRebound(to:capacity:_:)` method.
1086
1082
/// - buffer: The buffer temporarily bound to instances of `T`.
1087
1083
/// - Returns: The return value, if any, of the `body` closure parameter.
1088
- @inlinable
1089
1084
@_alwaysEmitIntoClient
1090
- public func withMemoryRebound< T: ~ Copyable, Result : ~ Copyable , E : Error > (
1085
+ public func withMemoryRebound< T: ~ Copyable, E : Error , Result : ~ Copyable > (
1091
1086
to type: T . Type ,
1092
1087
_ body: ( _ buffer: Unsafe ${ Mutable} BufferPointer< T > ) throws ( E ) -> Result
1093
1088
) throws ( E) -> Result {
@@ -1123,7 +1118,6 @@ extension Unsafe${Mutable}RawBufferPointer {
1123
1118
///
1124
1119
/// - Parameter to: The type `T` that the memory has already been bound to.
1125
1120
/// - Returns: A typed pointer to the same memory as this raw pointer.
1126
- @inlinable
1127
1121
@_alwaysEmitIntoClient
1128
1122
public func assumingMemoryBound< T: ~ Copyable> (
1129
1123
to: T . Type
@@ -1139,9 +1133,8 @@ extension Unsafe${Mutable}RawBufferPointer {
1139
1133
}
1140
1134
1141
1135
% if Mutable:
1142
- @inlinable
1143
1136
@_alwaysEmitIntoClient
1144
- public func withContiguousMutableStorageIfAvailable< R: ~ Copyable > (
1137
+ public func withContiguousMutableStorageIfAvailable< R> (
1145
1138
_ body: ( inout UnsafeMutableBufferPointer < Element > ) throws -> R
1146
1139
) rethrows -> R ? {
1147
1140
#if $TypedThrows
@@ -1161,9 +1154,8 @@ extension Unsafe${Mutable}RawBufferPointer {
1161
1154
}
1162
1155
1163
1156
% end
1164
- @inlinable
1165
1157
@_alwaysEmitIntoClient
1166
- public func withContiguousStorageIfAvailable< R: ~ Copyable > (
1158
+ public func withContiguousStorageIfAvailable< R> (
1167
1159
_ body: ( UnsafeBufferPointer < Element > ) throws -> R
1168
1160
) rethrows -> R ? {
1169
1161
#if $TypedThrows
0 commit comments