mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -945,6 +945,7 @@ extension String.UTF16View {
|
||||
|
||||
readIdx &+= len
|
||||
}
|
||||
fatalError()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user