Skip to content

Commit 81d55fa

Browse files
author
David Ungar
committed
Small cleanups
1 parent 6381e75 commit 81d55fa

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -839,9 +839,7 @@ extension Driver {
839839
forceResponseFiles: forceResponseFiles,
840840
recordedInputModificationDates: recordedInputModificationDates)
841841

842-
buildRecordInfo?.writeBuildRecord(
843-
jobs,
844-
nil)
842+
buildRecordInfo?.writeBuildRecord( jobs, nil)
845843

846844
// If requested, warn for options that weren't used by the driver after the build is finished.
847845
if parsedOptions.hasArgument(.driverWarnUnusedOptions) {

Sources/SwiftDriver/Incremental Compilation/BuildRecordInfo.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ import SwiftOptions
100100
: partialBuildRecordPath
101101
}
102102

103+
/// Write out the build record.
104+
/// \c Jobs must include all of the compilation jobs.
105+
/// \c Inputs will hold all the primary inputs that were not compiled because of incremental compilation
103106
func writeBuildRecord(_ jobs: [Job],
104-
_ deferredInputs: Set<TypedVirtualPath>?
107+
_ Inputs: Set<TypedVirtualPath>?
105108
) {
106109
let jobResultsByInput = Dictionary(
107110
uniqueKeysWithValues: finishedCommands.flatMap { job, result in
@@ -116,7 +119,7 @@ import SwiftOptions
116119
uniqueKeysWithValues:
117120
compilationInputModificationDates.map { input, modDate in
118121
let status = InputInfo.Status.finalStatus(
119-
wasDeferred: deferredInputs?.contains(input),
122+
wasDeferred: Inputs?.contains(input),
120123
jobResult: jobResultsByInput[input])
121124
return (input.file, InputInfo(status: status, previousModTime: modDate))
122125
}

Sources/SwiftDriver/Incremental Compilation/InputInfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public extension InputInfo {
7474
jobResult: ProcessResult?
7575
) -> Self {
7676
assert(wasDeferred != true || jobResult == nil,
77-
"When run, should have been removed from deferred status")
77+
"When run, should have been removed from status")
7878
if (jobResult?.isAOK ?? false) || wasDeferred == true {
7979
return .upToDate
8080
}

0 commit comments

Comments
 (0)