File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1166,8 +1166,8 @@ extension UnsafeMutablePointer where Pointee: ~Copyable {
1166
1166
@discardableResult
1167
1167
public func deinitialize( count: Int ) -> UnsafeMutableRawPointer {
1168
1168
_debugPrecondition ( count >= 0 , " UnsafeMutablePointer.deinitialize with negative count " )
1169
- // TODO: IRGen optimization when ` count` value is statically known to be 1,
1170
- // then call `Builtin.destroy(Pointee.self, _rawValue)` instead .
1169
+ // Note: When count is statically known to be 1 the compiler will optimize
1170
+ // away a call to swift_arrayDestroy into the type's specific destroy .
1171
1171
Builtin . destroyArray ( Pointee . self, _rawValue, count. _builtinWordValue)
1172
1172
return UnsafeMutableRawPointer ( self )
1173
1173
}
You can’t perform that action at this time.
0 commit comments