Skip to content

Commit 8c0db3f

Browse files
authored
Merge pull request #72075 from Catfish-Man/this-pointer-is-raw
Make UnsafeRawBufferPointer.loadUnaligned inlinable to match other pointer load methods
2 parents 2f7f657 + df8485f commit 8c0db3f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/core/UnsafeRawBufferPointer.swift.gyb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ extension Unsafe${Mutable}RawBufferPointer {
431431
/// - Returns: A new instance of type `T`, copied from the buffer pointer's
432432
/// memory.
433433
#if $BitwiseCopyable
434+
@inlinable
434435
@_alwaysEmitIntoClient
435436
public func loadUnaligned<T : _BitwiseCopyable>(
436437
fromByteOffset offset: Int = 0,
@@ -442,6 +443,7 @@ extension Unsafe${Mutable}RawBufferPointer {
442443
return baseAddress!.loadUnaligned(fromByteOffset: offset, as: T.self)
443444
}
444445
#endif
446+
@inlinable
445447
@_alwaysEmitIntoClient
446448
public func loadUnaligned<T>(
447449
fromByteOffset offset: Int = 0,

0 commit comments

Comments
 (0)