Skip to content

Commit a817228

Browse files
committed
Work around SIL optimizer bug
Building for release mode is triggering a SIL verifier failure related to memory management (the return value gets initialized twice). Force the affected function to be optimized for size rather than speed, which avoids the problem.
1 parent 23e5a32 commit a817228

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/SwiftParser/Names.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ extension TokenConsumer {
8484
/// - `extra`: Tokens for additional trailing module selectors. There is no situation in which two module selectors
8585
/// can be validly chained.
8686
/// - `skipQualifiedName`: True if the next token should be interpreted as a different statement.
87+
@_optimize(size) // Work around SIL optimizer bug (rdar://158171994)
8788
mutating func consumeModuleSelectorTokensIfPresent() -> (
8889
moduleNameOrUnexpected: Token, colonColonToken: Token, extra: [Token], skipQualifiedName: Bool
8990
)? {

0 commit comments

Comments
 (0)