mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Disable runtime cow verification for mutableSpan property
This commit is contained in:
@@ -818,6 +818,16 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if INTERNAL_CHECKS_ENABLED && COW_CHECKS_ENABLED
|
||||
@_alwaysEmitIntoClient
|
||||
internal mutating func beginCOWMutationUnchecked() -> Bool {
|
||||
if Bool(Builtin.beginCOWMutation(&_storage)) {
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/// Puts the buffer in an immutable state.
|
||||
///
|
||||
/// - Precondition: The buffer must be mutable or the empty array singleton.
|
||||
|
||||
Reference in New Issue
Block a user