Skip to content

Commit 631d7eb

Browse files
committed
Update isSDKTooOld to be compatible with older compilers.
5.3 and ealier compilers may hit: ``` swift-driver/Sources/SwiftDriver/Driver/Driver.swift:2044:15: error: definition conflicts with previous value guard let sdkInfo = sdkInfo else { ```
1 parent b7fb587 commit 631d7eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,8 +2040,8 @@ extension Driver {
20402040
extension Driver {
20412041
static func isSDKTooOld(sdkPath: AbsolutePath, fileSystem: FileSystem,
20422042
diagnosticsEngine: DiagnosticsEngine) -> Bool {
2043-
let sdkInfo = DarwinToolchain.readSDKInfo(fileSystem, VirtualPath.absolute(sdkPath).intern())
2044-
guard let sdkInfo = sdkInfo else {
2043+
let sdkInfoReadAttempt = DarwinToolchain.readSDKInfo(fileSystem, VirtualPath.absolute(sdkPath).intern())
2044+
guard let sdkInfo = sdkInfoReadAttempt else {
20452045
diagnosticsEngine.emit(.warning_no_sdksettings_json(sdkPath.pathString))
20462046
return false
20472047
}

0 commit comments

Comments
 (0)