@@ -236,7 +236,7 @@ public extension Driver {
236
236
return fallbackToFrontend
237
237
}
238
238
239
- private func sanitizeCommandForLibScanInvocation( _ command: inout [ String ] ) {
239
+ static func sanitizeCommandForLibScanInvocation( _ command: inout [ String ] ) {
240
240
// Remove the tool executable to only leave the arguments. When passing the
241
241
// command line into libSwiftScan, the library is itself the tool and only
242
242
// needs to parse the remaining arguments.
@@ -257,10 +257,10 @@ public extension Driver {
257
257
let isSwiftScanLibAvailable = !( try initSwiftScanLib ( ) )
258
258
if isSwiftScanLibAvailable {
259
259
let cwd = workingDirectory ?? fileSystem. currentWorkingDirectory!
260
- var command = try itemizedJobCommand ( of: preScanJob,
261
- useResponseFiles: . disabled,
262
- using: executor. resolver)
263
- sanitizeCommandForLibScanInvocation ( & command)
260
+ var command = try Self . itemizedJobCommand ( of: preScanJob,
261
+ useResponseFiles: . disabled,
262
+ using: executor. resolver)
263
+ Self . sanitizeCommandForLibScanInvocation ( & command)
264
264
imports =
265
265
try interModuleDependencyOracle. getImports ( workingDirectory: cwd,
266
266
moduleAliases: moduleOutputInfo. aliases,
@@ -293,10 +293,10 @@ public extension Driver {
293
293
let isSwiftScanLibAvailable = !( try initSwiftScanLib ( ) )
294
294
if isSwiftScanLibAvailable {
295
295
let cwd = workingDirectory ?? fileSystem. currentWorkingDirectory!
296
- var command = try itemizedJobCommand ( of: scannerJob,
297
- useResponseFiles: . disabled,
298
- using: executor. resolver)
299
- sanitizeCommandForLibScanInvocation ( & command)
296
+ var command = try Self . itemizedJobCommand ( of: scannerJob,
297
+ useResponseFiles: . disabled,
298
+ using: executor. resolver)
299
+ Self . sanitizeCommandForLibScanInvocation ( & command)
300
300
dependencyGraph =
301
301
try interModuleDependencyOracle. getDependencies ( workingDirectory: cwd,
302
302
moduleAliases: moduleOutputInfo. aliases,
@@ -339,10 +339,10 @@ public extension Driver {
339
339
let isSwiftScanLibAvailable = !( try initSwiftScanLib ( ) )
340
340
if isSwiftScanLibAvailable {
341
341
let cwd = workingDirectory ?? fileSystem. currentWorkingDirectory!
342
- var command = try itemizedJobCommand ( of: batchScanningJob,
343
- useResponseFiles: . disabled,
344
- using: executor. resolver)
345
- sanitizeCommandForLibScanInvocation ( & command)
342
+ var command = try Self . itemizedJobCommand ( of: batchScanningJob,
343
+ useResponseFiles: . disabled,
344
+ using: executor. resolver)
345
+ Self . sanitizeCommandForLibScanInvocation ( & command)
346
346
moduleVersionedGraphMap =
347
347
try interModuleDependencyOracle. getBatchDependencies ( workingDirectory: cwd,
348
348
moduleAliases: moduleOutputInfo. aliases,
@@ -485,8 +485,8 @@ public extension Driver {
485
485
contents)
486
486
}
487
487
488
- fileprivate func itemizedJobCommand( of job: Job , useResponseFiles: ResponseFileHandling ,
489
- using resolver: ArgsResolver ) throws -> [ String ] {
488
+ static func itemizedJobCommand( of job: Job , useResponseFiles: ResponseFileHandling ,
489
+ using resolver: ArgsResolver ) throws -> [ String ] {
490
490
let ( args, _) = try resolver. resolveArgumentList ( for: job,
491
491
useResponseFiles: useResponseFiles)
492
492
return args
0 commit comments