@@ -236,7 +236,7 @@ public extension Driver {
236236 return fallbackToFrontend
237237 }
238238
239- private func sanitizeCommandForLibScanInvocation( _ command: inout [ String ] ) {
239+ static func sanitizeCommandForLibScanInvocation( _ command: inout [ String ] ) {
240240 // Remove the tool executable to only leave the arguments. When passing the
241241 // command line into libSwiftScan, the library is itself the tool and only
242242 // needs to parse the remaining arguments.
@@ -257,10 +257,10 @@ public extension Driver {
257257 let isSwiftScanLibAvailable = !( try initSwiftScanLib ( ) )
258258 if isSwiftScanLibAvailable {
259259 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)
264264 imports =
265265 try interModuleDependencyOracle. getImports ( workingDirectory: cwd,
266266 moduleAliases: moduleOutputInfo. aliases,
@@ -293,10 +293,10 @@ public extension Driver {
293293 let isSwiftScanLibAvailable = !( try initSwiftScanLib ( ) )
294294 if isSwiftScanLibAvailable {
295295 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)
300300 dependencyGraph =
301301 try interModuleDependencyOracle. getDependencies ( workingDirectory: cwd,
302302 moduleAliases: moduleOutputInfo. aliases,
@@ -339,10 +339,10 @@ public extension Driver {
339339 let isSwiftScanLibAvailable = !( try initSwiftScanLib ( ) )
340340 if isSwiftScanLibAvailable {
341341 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)
346346 moduleVersionedGraphMap =
347347 try interModuleDependencyOracle. getBatchDependencies ( workingDirectory: cwd,
348348 moduleAliases: moduleOutputInfo. aliases,
@@ -485,8 +485,8 @@ public extension Driver {
485485 contents)
486486 }
487487
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 ] {
490490 let ( args, _) = try resolver. resolveArgumentList ( for: job,
491491 useResponseFiles: useResponseFiles)
492492 return args
0 commit comments