Skip to content

Commit 6b348db

Browse files
committed
Fix build warnings due to deprecated API usage or unreachable code
1 parent f69e134 commit 6b348db

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

Sources/SwiftDriver/ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -441,16 +441,7 @@ extension ExplicitDependencyBuildPlanner {
441441
if let previouslyHashsedName = hashedModuleNameCache[cacheQuery] {
442442
return previouslyHashsedName
443443
}
444-
let hashedArguments: String
445-
#if canImport(Darwin)
446-
if #available(macOS 10.15, *) {
447-
hashedArguments = CryptoKitSHA256().hash(hashInput).hexadecimalRepresentation
448-
} else {
449-
hashedArguments = SHA256().hash(hashInput).hexadecimalRepresentation
450-
}
451-
#else
452-
hashedArguments = SHA256().hash(hashInput).hexadecimalRepresentation
453-
#endif
444+
let hashedArguments = SHA256().hash(hashInput).hexadecimalRepresentation
454445
let resultingName = moduleName + "-" + hashedArguments
455446
hashedModuleNameCache[cacheQuery] = resultingName
456447
return resultingName

Sources/SwiftDriver/IncrementalCompilation/BuildRecordInfo.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,7 @@ import SwiftOptions
112112
.map { $0.option.spelling }
113113
.sorted()
114114
.joined()
115-
#if canImport(Darwin)
116-
if #available(macOS 10.15, *) {
117-
return CryptoKitSHA256().hash(hashInput).hexadecimalRepresentation
118-
} else {
119-
return SHA256().hash(hashInput).hexadecimalRepresentation
120-
}
121-
#else
122115
return SHA256().hash(hashInput).hexadecimalRepresentation
123-
#endif
124116
}
125117

126118
/// Determine the input and output path for the build record

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4372,9 +4372,7 @@ final class SwiftDriverTests: XCTestCase {
43724372

43734373
func testVerboseImmediateMode() throws {
43744374
#if os(macOS) && arch(arm64)
4375-
// Temporarily disabled on Apple Silicon
4376-
// rdar://80558898
4377-
throw XCTSkip()
4375+
try XCTSkipIf(true, "Temporarily disabled on Apple Silicon (rdar://80558898)")
43784376
#endif
43794377

43804378
// There is nothing particularly macOS-specific about this test other than

0 commit comments

Comments
 (0)