@@ -640,7 +640,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
640640 }
641641
642642 func testModuleAliasingWithImportPrescan( ) throws {
643- let ( _, _, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
643+ let ( _, _, toolchain, _ ) = try getDriverArtifactsForScanning ( )
644644
645645 let dummyDriver = try Driver ( args: [ " swiftc " , " -module-name " , " dummyDriverCheck " , " test.swift " ] )
646646 guard dummyDriver. isFrontendArgSupported ( . moduleAlias) else {
@@ -650,9 +650,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
650650 // The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
651651 // queries.
652652 let dependencyOracle = InterModuleDependencyOracle ( )
653- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
654- hostTriple: hostTriple,
655- env: ProcessEnv . vars)
653+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
656654 guard try dependencyOracle
657655 . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
658656 swiftScanLibPath: scanLibPath) else {
@@ -832,9 +830,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
832830
833831 // 2. Run a dependency scan to find the just-built module
834832 let dependencyOracle = InterModuleDependencyOracle ( )
835- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
836- hostTriple: hostTriple,
837- env: ProcessEnv . vars)
833+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
838834 guard try dependencyOracle
839835 . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
840836 swiftScanLibPath: scanLibPath) else {
@@ -931,14 +927,12 @@ final class ExplicitModuleBuildTests: XCTestCase {
931927
932928 /// Test the libSwiftScan dependency scanning (import-prescan).
933929 func testDependencyImportPrescan( ) throws {
934- let ( stdLibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
930+ let ( stdLibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
935931
936932 // The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
937933 // queries.
938934 let dependencyOracle = InterModuleDependencyOracle ( )
939- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
940- hostTriple: hostTriple,
941- env: ProcessEnv . vars)
935+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
942936 guard try dependencyOracle
943937 . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
944938 swiftScanLibPath: scanLibPath) else {
@@ -1009,14 +1003,12 @@ final class ExplicitModuleBuildTests: XCTestCase {
10091003 }
10101004
10111005 func testDependencyScanningFailure( ) throws {
1012- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1006+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
10131007
10141008 // The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
10151009 // queries.
10161010 let dependencyOracle = InterModuleDependencyOracle ( )
1017- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1018- hostTriple: hostTriple,
1019- env: ProcessEnv . vars)
1011+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
10201012 guard try dependencyOracle
10211013 . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
10221014 swiftScanLibPath: scanLibPath) else {
@@ -1087,9 +1079,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
10871079 // The dependency oracle wraps an instance of libSwiftScan and ensures thread safety across
10881080 // queries.
10891081 let dependencyOracle = InterModuleDependencyOracle ( )
1090- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1091- hostTriple: hostTriple,
1092- env: ProcessEnv . vars)
1082+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
10931083 guard try dependencyOracle
10941084 . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
10951085 swiftScanLibPath: scanLibPath) else {
@@ -1277,11 +1267,9 @@ final class ExplicitModuleBuildTests: XCTestCase {
12771267 }
12781268
12791269 func testDependencyGraphDotSerialization( ) throws {
1280- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1270+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
12811271 let dependencyOracle = InterModuleDependencyOracle ( )
1282- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1283- hostTriple: hostTriple,
1284- env: ProcessEnv . vars)
1272+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
12851273 guard try dependencyOracle
12861274 . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
12871275 swiftScanLibPath: scanLibPath) else {
@@ -1342,7 +1330,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
13421330
13431331 /// Test the libSwiftScan dependency scanning.
13441332 func testDependencyScanReuseCache( ) throws {
1345- let ( stdlibPath, shimsPath, toolchain, hostTriple ) = try getDriverArtifactsForScanning ( )
1333+ let ( stdlibPath, shimsPath, toolchain, _ ) = try getDriverArtifactsForScanning ( )
13461334 try withTemporaryDirectory { path in
13471335 let cacheSavePath = path. appending ( component: " saved.moddepcache " )
13481336 let main = path. appending ( component: " testDependencyScanning.swift " )
@@ -1378,9 +1366,7 @@ final class ExplicitModuleBuildTests: XCTestCase {
13781366 scannerCommand. removeFirst ( )
13791367 }
13801368
1381- let scanLibPath = try Driver . getScanLibPath ( of: toolchain,
1382- hostTriple: hostTriple,
1383- env: ProcessEnv . vars)
1369+ let scanLibPath = try toolchain. lookupSwiftScanLib ( )
13841370 // Run the first scan and serialize the cache contents.
13851371 let firstDependencyOracle = InterModuleDependencyOracle ( )
13861372 guard try firstDependencyOracle
0 commit comments