Skip to content

Commit e2b733a

Browse files
committed
[Parseable output] Use FileType's description for the file type.
FileType.description provides the "external" name for each file type, which is used for parsable output and output file maps, among other things. Fix the description for serialized diagnostics files... so now diagnostics show up properly in Xcode.
1 parent cfa181b commit e2b733a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public struct ToolExecutionDelegate: JobExecutorDelegate {
3232

3333
// Compute the outputs for the message.
3434
let outputs: [BeganMessage.Output] = job.outputs.map {
35-
.init(path: $0.file.name, type: $0.type.rawValue)
35+
.init(path: $0.file.name, type: $0.type.description)
3636
}
3737

3838
let beganMessage = BeganMessage(

Sources/SwiftDriver/Utilities/FileType.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ extension FileType: CustomStringConvertible {
111111
switch self {
112112
case .swift, .sil, .sib, .image, .object, .dSYM, .dependencies, .autolink,
113113
.swiftModule, .swiftDocumentation, .swiftInterface, .assembly,
114-
.diagnostics, .remap, .tbd, .pcm, .pch:
114+
.remap, .tbd, .pcm, .pch:
115115
return rawValue
116116

117117
case .ast:
@@ -146,6 +146,9 @@ extension FileType: CustomStringConvertible {
146146

147147
case .optimizationRecord:
148148
return "opt-record"
149+
150+
case .diagnostics:
151+
return "diagnostics"
149152
}
150153
}
151154
}

0 commit comments

Comments
 (0)