@@ -296,6 +296,10 @@ void CompilerInstance::createVirtualFileSystem(
296
296
DiagnosticsEngine Diags (DiagnosticIDs::create (), DiagOpts, DC,
297
297
/* ShouldOwnClient=*/ false );
298
298
299
+ std::tie (CAS, ActionCache) =
300
+ getInvocation ().getCASOpts ().getOrCreateDatabases (
301
+ Diags, /* CreateEmptyCASOnFailure=*/ false );
302
+
299
303
VFS = createVFSFromCompilerInvocation (getInvocation (), Diags,
300
304
std::move (BaseFS), CAS);
301
305
// FIXME: Should this go into createVFSFromCompilerInvocation?
@@ -970,7 +974,7 @@ llvm::vfs::OutputBackend &CompilerInstance::getOrCreateOutputManager() {
970
974
971
975
std::pair<std::shared_ptr<llvm::cas::ObjectStore>,
972
976
std::shared_ptr<llvm::cas::ActionCache>>
973
- CompilerInstance::createCASDatabases () {
977
+ CompilerInstance::getOrCreateCASDatabases () {
974
978
// Create a new CAS databases from the CompilerInvocation. Future calls to
975
979
// createFileManager() will use the same CAS.
976
980
std::tie (CAS, ActionCache) =
@@ -982,13 +986,13 @@ CompilerInstance::createCASDatabases() {
982
986
983
987
llvm::cas::ObjectStore &CompilerInstance::getOrCreateObjectStore () {
984
988
if (!CAS)
985
- createCASDatabases ();
989
+ getOrCreateCASDatabases ();
986
990
return *CAS;
987
991
}
988
992
989
993
llvm::cas::ActionCache &CompilerInstance::getOrCreateActionCache () {
990
994
if (!ActionCache)
991
- createCASDatabases ();
995
+ getOrCreateCASDatabases ();
992
996
return *ActionCache;
993
997
}
994
998
0 commit comments