Skip to content

Commit b4d30b7

Browse files
authored
Merge pull request #5988 from Gankro/roundup
[stdlib] delete dead code
2 parents 5b82297 + bd50a6a commit b4d30b7

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

stdlib/public/core/Builtin.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,6 @@ internal func _roundUp(_ offset: Int, toAlignment alignment: Int) -> Int {
7272
return Int(_roundUpImpl(UInt(bitPattern: offset), toAlignment: alignment))
7373
}
7474

75-
// This function takes a raw pointer and returns a typed pointer. It implicitly
76-
// assumes that memory at the returned pointer is bound to `Destination` type.
77-
@_versioned
78-
internal func _roundUp<DestinationType>(
79-
_ pointer: UnsafeMutableRawPointer,
80-
toAlignmentOf destinationType: DestinationType.Type
81-
) -> UnsafeMutablePointer<DestinationType> {
82-
// Note: unsafe unwrap is safe because this operation can only increase the
83-
// value, and can not produce a null pointer.
84-
return UnsafeMutablePointer<DestinationType>(
85-
bitPattern: _roundUpImpl(
86-
UInt(bitPattern: pointer),
87-
toAlignment: MemoryLayout<DestinationType>.alignment)
88-
).unsafelyUnwrapped
89-
}
90-
9175
/// Returns a tri-state of 0 = no, 1 = yes, 2 = maybe.
9276
@_transparent
9377
public // @testable

0 commit comments

Comments
 (0)