Skip to content

Commit 6c4f291

Browse files
committed
Workaround for fileprivate array issue
A recent compiler change results in fileprivate arrays sometimes not keeping their buffers around long enough. This change avoids that issue by removing the fileprivate annotations from the affected type.
1 parent 3a3dc7a commit 6c4f291

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Sources/_StringProcessing/MatchingOptions.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
/// A type that represents the current state of regex matching options, with
1515
/// stack-based scoping.
1616
struct MatchingOptions {
17-
fileprivate var stack: [Representation]
17+
// FIXME: Workaround for rdar://104923020
18+
// fileprivate
19+
var stack: [Representation]
1820

1921
fileprivate func _invariantCheck() {
2022
assert(!stack.isEmpty, "Unbalanced call to endScope")
@@ -125,7 +127,9 @@ extension MatchingOptions {
125127
// MARK: - Implementation
126128
extension MatchingOptions {
127129
/// An option that changes the behavior of a regular expression.
128-
fileprivate enum Option: Int {
130+
// FIXME: Workaround for rdar://104923020
131+
// fileprivate
132+
enum Option: Int {
129133
// PCRE options
130134
case caseInsensitive
131135
case allowDuplicateGroupNames
@@ -212,7 +216,9 @@ extension MatchingOptions {
212216

213217
extension MatchingOptions {
214218
/// A set of matching options.
215-
fileprivate struct Representation: OptionSet, RawRepresentable {
219+
// FIXME: Workaround for rdar://104923020
220+
// fileprivate
221+
struct Representation: OptionSet, RawRepresentable {
216222
var rawValue: UInt32
217223

218224
/// Returns `true` if the option denoted by `kind` is a member of this set.

0 commit comments

Comments
 (0)