Skip to content

Commit bd0a593

Browse files
author
David Ungar
committed
Workaround compiler issue
1 parent 92a6786 commit bd0a593

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Sources/SwiftDriver/IncrementalCompilation/BidirectionalMap.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public struct BidirectionalMap<T1: Hashable, T2: Hashable>: Equatable, Sequence
2626
return value
2727
}
2828
set {
29-
if let newValue = newValue {
30-
map1[key] = newValue
31-
map2[newValue] = key
29+
if let someNewValue = newValue {
30+
map1[key] = someNewValue
31+
map2[someNewValue] = key
3232
return
3333
}
3434
if let oldValue = map1.removeValue(forKey: key) {
@@ -45,9 +45,9 @@ public struct BidirectionalMap<T1: Hashable, T2: Hashable>: Equatable, Sequence
4545
return value
4646
}
4747
set {
48-
if let newValue = newValue {
49-
map2[key] = newValue
50-
map1[newValue] = key
48+
if let someNewValue = newValue {
49+
map2[key] = someNewValue
50+
map1[someNewValue] = key
5151
return
5252
}
5353
if let oldValue = map2.removeValue(forKey: key) {

Sources/SwiftDriver/IncrementalCompilation/InitialStateComputer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,17 @@ extension IncrementalCompilationState.InitialStateComputer {
126126
) -> (ModuleDependencyGraph, Set<TypedVirtualPath>)?
127127
{
128128
let dependencyGraphPath = buildRecordInfo.dependencyGraphPath
129-
let graph: ModuleDependencyGraph?
129+
let graphIfPresent: ModuleDependencyGraph?
130130
do {
131-
graph = try ModuleDependencyGraph.read( from: dependencyGraphPath, info: self)
131+
graphIfPresent = try ModuleDependencyGraph.read( from: dependencyGraphPath, info: self)
132132
}
133133
catch {
134134
diagnosticEngine.emit(
135135
warning: "Could not read \(dependencyGraphPath), will not do cross-module incremental builds")
136136
reporter?.reportDisablingIncrementalBuild("Could not read priors from \(dependencyGraphPath)")
137137
return nil
138138
}
139-
guard let graph = graph
139+
guard let graph = graphIfPresent
140140
else {
141141
return buildInitialGraphFromSwiftDepsAndCollectInputsInvalidatedByChangedExternals()
142142
}

0 commit comments

Comments
 (0)