@@ -637,9 +637,9 @@ bool SwiftDependencyScanningService::setupCachingDependencyScanningService(
637637 if (!Instance.getInvocation ().getCASOptions ().EnableCaching )
638638 return false ;
639639
640- if (CASOpts ) {
640+ if (CASConfig ) {
641641 // If CASOption matches, the service is initialized already.
642- if (*CASOpts == Instance.getInvocation ().getCASOptions ().CASOpts )
642+ if (*CASConfig == Instance.getInvocation ().getCASOptions ().Config )
643643 return false ;
644644
645645 // CASOption mismatch, return error.
@@ -648,13 +648,18 @@ bool SwiftDependencyScanningService::setupCachingDependencyScanningService(
648648 }
649649
650650 // Setup CAS.
651- CASOpts = Instance.getInvocation ().getCASOptions ().CASOpts ;
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 ;
652657
653658 ClangScanningService.emplace (
654659 clang::tooling::dependencies::ScanningMode::DependencyDirectivesScan,
655660 clang::tooling::dependencies::ScanningOutputFormat::FullIncludeTree,
656- Instance.getInvocation (). getCASOptions (). CASOpts ,
657- Instance.getSharedCASInstance (), Instance. getSharedCacheInstance (),
661+ CASOpts, Instance.getSharedCASInstance () ,
662+ Instance.getSharedCacheInstance (),
658663 /* CachingOnDiskFileSystem=*/ nullptr ,
659664 // The current working directory optimization (off by default)
660665 // should not impact CAS. We set the optization to all to be
0 commit comments