@@ -637,9 +637,9 @@ bool SwiftDependencyScanningService::setupCachingDependencyScanningService(
637637 if (!Instance.getInvocation ().getCASOptions ().EnableCaching )
638638 return false ;
639639
640- if (CASConfig ) {
640+ if (CASOpts ) {
641641 // If CASOption matches, the service is initialized already.
642- if (*CASConfig == Instance.getInvocation ().getCASOptions ().Config )
642+ if (*CASOpts == Instance.getInvocation ().getCASOptions ().CASOpts )
643643 return false ;
644644
645645 // CASOption mismatch, return error.
@@ -648,18 +648,13 @@ bool SwiftDependencyScanningService::setupCachingDependencyScanningService(
648648 }
649649
650650 // Setup CAS.
651- CASConfig = Instance.getInvocation ().getCASOptions ().Config ;
652-
653- clang::CASOptions CASOpts;
654- CASOpts.CASPath = CASConfig->CASPath ;
655- CASOpts.PluginPath = CASConfig->PluginPath ;
656- CASOpts.PluginOptions = CASConfig->PluginOptions ;
651+ CASOpts = Instance.getInvocation ().getCASOptions ().CASOpts ;
657652
658653 ClangScanningService.emplace (
659654 clang::tooling::dependencies::ScanningMode::DependencyDirectivesScan,
660655 clang::tooling::dependencies::ScanningOutputFormat::FullIncludeTree,
661- CASOpts, Instance.getSharedCASInstance () ,
662- Instance.getSharedCacheInstance (),
656+ Instance.getInvocation (). getCASOptions (). CASOpts ,
657+ Instance.getSharedCASInstance (), Instance. getSharedCacheInstance (),
663658 /* CachingOnDiskFileSystem=*/ nullptr ,
664659 // The current working directory optimization (off by default)
665660 // should not impact CAS. We set the optization to all to be
0 commit comments