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 {
11661166 @discardableResult
11671167 public func deinitialize( count: Int ) -> UnsafeMutableRawPointer {
11681168 _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 .
11711171 Builtin . destroyArray ( Pointee . self, _rawValue, count. _builtinWordValue)
11721172 return UnsafeMutableRawPointer ( self )
11731173 }
You can’t perform that action at this time.
0 commit comments