@@ -199,9 +199,7 @@ private extension ToolExecutionDelegate {
199
199
result. append (
200
200
constructSingleBeganMessage ( inputs: [ input] ,
201
201
outputs: outputPaths,
202
- arguments: Self . filterPrimaryArguments ( in: arguments,
203
- input: input,
204
- outputs: outputPaths) ,
202
+ arguments: arguments,
205
203
pid: quasiPID,
206
204
realPid: pid) )
207
205
// Save the quasiPID of this job/input combination in order to generate the correct
@@ -300,44 +298,6 @@ private extension ToolExecutionDelegate {
300
298
return SignalledMessage ( pid: pid, realPid: realPid, output: output,
301
299
errorMessage: error, signal: Int ( signal) )
302
300
}
303
-
304
- /// Best-effort attempt to "fix-up" the individual swift-frontend invocation command line, to pretend
305
- /// it is an individual single-primary compile job, rather than a batch mode compile with multiple primaries
306
- static func filterPrimaryArguments( in arguments: [ String ] ,
307
- input: TypedVirtualPath ,
308
- outputs: [ TypedVirtualPath ] ) -> [ String ] {
309
- // We must have only one `-primary-file` option specified, the one that corresponds
310
- // to the primary file whose job this message is faking.
311
- var result = arguments. enumerated ( ) . compactMap ( ) { index, element -> String ? in
312
- if element == " -primary-file " {
313
- assert ( arguments. count > index + 1 )
314
- return arguments [ index + 1 ] . hasSuffix ( input. file. basename) ? element : nil
315
- }
316
- return element
317
- }
318
-
319
- // We must have only one `-o` option specified, the one that corresponds
320
- // to the primary output file for the current input, whose job this message is faking.
321
- let outputPathStrings = outputs. map { $0. file. description }
322
- var pathsToRemove : [ String ] = [ ]
323
- result = result. enumerated ( ) . compactMap ( ) { index, element -> String ? in
324
- if element == " -o " {
325
- assert ( result. count > index + 1 )
326
- if outputPathStrings. contains ( result [ index + 1 ] ) {
327
- return element
328
- } else {
329
- pathsToRemove. append ( result [ index + 1 ] )
330
- return nil
331
- }
332
- }
333
- if pathsToRemove. contains ( element) {
334
- return nil
335
- }
336
- return element
337
- }
338
-
339
- return result
340
- }
341
301
}
342
302
343
303
fileprivate extension Diagnostic . Message {
0 commit comments