Skip to content

Commit a0fc6e2

Browse files
authored
Merge pull request #80712 from meg-gupta/fixoslog
Add @_transparent to some more Integer operations
2 parents f31c89a + fc90619 commit a0fc6e2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stdlib/public/core/Integers.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,6 +2158,7 @@ where Magnitude: FixedWidthInteger & UnsignedInteger,
21582158

21592159
extension FixedWidthInteger {
21602160
@inlinable
2161+
@_transparent
21612162
public var bitWidth: Int { return Self.bitWidth }
21622163

21632164
@inlinable
@@ -2770,7 +2771,7 @@ extension FixedWidthInteger {
27702771
}
27712772

27722773
@inlinable // FIXME(inline-always)
2773-
@inline(__always)
2774+
@_transparent
27742775
public init<T: BinaryInteger>(truncatingIfNeeded source: T) {
27752776
if Self.bitWidth <= Int.bitWidth {
27762777
self = Self(_truncatingBits: source._lowWord)
@@ -3015,7 +3016,7 @@ extension UnsignedInteger {
30153016
/// This property is always `false` for unsigned integer types.
30163017
@inlinable // FIXME(inline-always)
30173018
public static var isSigned: Bool {
3018-
@inline(__always)
3019+
@_transparent
30193020
get { return false }
30203021
}
30213022
}
@@ -3230,7 +3231,7 @@ extension SignedInteger {
32303231
/// This property is always `true` for signed integer types.
32313232
@inlinable // FIXME(inline-always)
32323233
public static var isSigned: Bool {
3233-
@inline(__always)
3234+
@_transparent
32343235
get { return true }
32353236
}
32363237
}

0 commit comments

Comments
 (0)