Skip to content

Commit 595ea99

Browse files
committed
[embedded] Guard @_transparent in UnsafePointer APIs with #if
1 parent baadab3 commit 595ea99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/public/core/UnsafePointer.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,9 @@ public struct UnsafePointer<Pointee>: _Pointer {
370370
/// by the key path, or `nil`.
371371
@inlinable
372372
@_alwaysEmitIntoClient
373+
#if $Embedded
373374
@_transparent
375+
#endif
374376
public func pointer<Property>(
375377
to property: KeyPath<Pointee, Property>
376378
) -> UnsafePointer<Property>? {
@@ -1132,7 +1134,9 @@ public struct UnsafeMutablePointer<Pointee>: _Pointer {
11321134
/// by the key path, or `nil`.
11331135
@inlinable
11341136
@_alwaysEmitIntoClient
1137+
#if $Embedded
11351138
@_transparent
1139+
#endif
11361140
public func pointer<Property>(
11371141
to property: KeyPath<Pointee, Property>
11381142
) -> UnsafePointer<Property>? {
@@ -1155,7 +1159,9 @@ public struct UnsafeMutablePointer<Pointee>: _Pointer {
11551159
/// by the key path, or `nil`.
11561160
@inlinable
11571161
@_alwaysEmitIntoClient
1162+
#if $Embedded
11581163
@_transparent
1164+
#endif
11591165
public func pointer<Property>(
11601166
to property: WritableKeyPath<Pointee, Property>
11611167
) -> UnsafeMutablePointer<Property>? {

0 commit comments

Comments
 (0)