Get stdlib building again

PR 79186 (https://github.com/swiftlang/swift/pull/79186) moved one of
the mandatory passes from the C++ implementation to the Swift
implementation resulting in a compiler that is unable to build the
standard library. The pass used to ensure that inaccessible control-flow
positions after an infinite loop was marked with `unreachable` in SIL.
Since the pass is no longer running, any function that returns a value
that also has an infinite loop internally must place a fatalError after
the infinite loop or it will fail to compile as the compiler will
determine that the function does not return from all control flow paths
even though some of the paths are unreachable.
This commit is contained in:
Evan Wilde
2025-03-05 15:44:02 -08:00
parent 0ec13f9a90
commit ddaf003c56
10 changed files with 14 additions and 0 deletions

View File

@@ -945,6 +945,7 @@ extension String.UTF16View {
readIdx &+= len
}
fatalError()
}
}