@@ -296,6 +296,10 @@ void CompilerInstance::createVirtualFileSystem(
296296 DiagnosticsEngine Diags (DiagnosticIDs::create (), DiagOpts, DC,
297297 /* ShouldOwnClient=*/ false );
298298
299+ std::tie (CAS, ActionCache) =
300+ getInvocation ().getCASOpts ().getOrCreateDatabases (
301+ Diags, /* CreateEmptyCASOnFailure=*/ false );
302+
299303 VFS = createVFSFromCompilerInvocation (getInvocation (), Diags,
300304 std::move (BaseFS), CAS);
301305 // FIXME: Should this go into createVFSFromCompilerInvocation?
@@ -970,7 +974,7 @@ llvm::vfs::OutputBackend &CompilerInstance::getOrCreateOutputManager() {
970974
971975std::pair<std::shared_ptr<llvm::cas::ObjectStore>,
972976 std::shared_ptr<llvm::cas::ActionCache>>
973- CompilerInstance::createCASDatabases () {
977+ CompilerInstance::getOrCreateCASDatabases () {
974978 // Create a new CAS databases from the CompilerInvocation. Future calls to
975979 // createFileManager() will use the same CAS.
976980 std::tie (CAS, ActionCache) =
@@ -982,13 +986,13 @@ CompilerInstance::createCASDatabases() {
982986
983987llvm::cas::ObjectStore &CompilerInstance::getOrCreateObjectStore () {
984988 if (!CAS)
985- createCASDatabases ();
989+ getOrCreateCASDatabases ();
986990 return *CAS;
987991}
988992
989993llvm::cas::ActionCache &CompilerInstance::getOrCreateActionCache () {
990994 if (!ActionCache)
991- createCASDatabases ();
995+ getOrCreateCASDatabases ();
992996 return *ActionCache;
993997}
994998
0 commit comments