Skip to content

Commit f071136

Browse files
committed
stdlib: temporarily disable COW support runtime checks.
Some lldb tests are failing with that.
1 parent 71a642e commit f071136

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

stdlib/public/core/ContiguousArrayBuffer.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,18 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
454454
@_alwaysEmitIntoClient
455455
internal var isImmutable: Bool {
456456
get {
457+
// TODO: Enable COW runtime checks by default (when INTERNAL_CHECKS_ENABLED
458+
// is set). Currently there is a problem with remote AST which needs to be
459+
// fixed.
460+
#if ENABLE_COW_RUNTIME_CHECKS
457461
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
458462
return capacity == 0 || _swift_isImmutableCOWBuffer(_storage)
459463
}
464+
#endif
460465
return true
461466
}
462467
nonmutating set {
468+
#if ENABLE_COW_RUNTIME_CHECKS
463469
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
464470
if newValue {
465471
if capacity > 0 {
@@ -475,14 +481,17 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
475481
"re-setting mutable array buffer to mutable")
476482
}
477483
}
484+
#endif
478485
}
479486
}
480487

481488
@_alwaysEmitIntoClient
482489
internal var isMutable: Bool {
490+
#if ENABLE_COW_RUNTIME_CHECKS
483491
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
484492
return !_swift_isImmutableCOWBuffer(_storage)
485493
}
494+
#endif
486495
return true
487496
}
488497
#endif

0 commit comments

Comments
 (0)