File tree Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Expand file tree Collapse file tree 3 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -530,12 +530,6 @@ class CompilerInstance : public ModuleLoader {
530
530
// / Get the CAS, or create it using the configuration in CompilerInvocation.
531
531
llvm::cas::ObjectStore &getOrCreateObjectStore ();
532
532
llvm::cas::ActionCache &getOrCreateActionCache ();
533
- std::shared_ptr<llvm::cas::ObjectStore> getObjectStorePtr () const {
534
- return CAS;
535
- }
536
- std::shared_ptr<llvm::cas::ActionCache> getActionCachePtr () const {
537
- return ActionCache;
538
- }
539
533
540
534
// / @}
541
535
// / @name Source Manager
@@ -1046,7 +1040,7 @@ class CompilerInstance : public ModuleLoader {
1046
1040
1047
1041
std::pair<std::shared_ptr<llvm::cas::ObjectStore>,
1048
1042
std::shared_ptr<llvm::cas::ActionCache>>
1049
- createCASDatabases ();
1043
+ getOrCreateCASDatabases ();
1050
1044
};
1051
1045
1052
1046
} // end namespace clang
Original file line number Diff line number Diff line change @@ -296,8 +296,7 @@ std::optional<int> CompileJobCache::initialize(CompilerInstance &Clang) {
296
296
if (!CacheCompileJob)
297
297
return std::nullopt ;
298
298
299
- CAS = Clang.getObjectStorePtr ();
300
- Cache = Clang.getActionCachePtr ();
299
+ std::tie (CAS, Cache) = Clang.getOrCreateCASDatabases ();
301
300
if (!CAS || !Cache)
302
301
return 1 ; // Exit with error!
303
302
Original file line number Diff line number Diff line change @@ -974,7 +974,7 @@ llvm::vfs::OutputBackend &CompilerInstance::getOrCreateOutputManager() {
974
974
975
975
std::pair<std::shared_ptr<llvm::cas::ObjectStore>,
976
976
std::shared_ptr<llvm::cas::ActionCache>>
977
- CompilerInstance::createCASDatabases () {
977
+ CompilerInstance::getOrCreateCASDatabases () {
978
978
// Create a new CAS databases from the CompilerInvocation. Future calls to
979
979
// createFileManager() will use the same CAS.
980
980
std::tie (CAS, ActionCache) =
@@ -986,13 +986,13 @@ CompilerInstance::createCASDatabases() {
986
986
987
987
llvm::cas::ObjectStore &CompilerInstance::getOrCreateObjectStore () {
988
988
if (!CAS)
989
- createCASDatabases ();
989
+ getOrCreateCASDatabases ();
990
990
return *CAS;
991
991
}
992
992
993
993
llvm::cas::ActionCache &CompilerInstance::getOrCreateActionCache () {
994
994
if (!ActionCache)
995
- createCASDatabases ();
995
+ getOrCreateCASDatabases ();
996
996
return *ActionCache;
997
997
}
998
998
You can’t perform that action at this time.
0 commit comments