diff options
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 39df352cb77..b8b390afc42 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -46,7 +46,6 @@ #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/LangOptions.h" -#include "clang/Basic/MemoryBufferCache.h" #include "clang/Basic/Module.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/OperatorKinds.h" @@ -76,6 +75,7 @@ #include "clang/Serialization/ASTDeserializationListener.h" #include "clang/Serialization/ContinuousRangeMap.h" #include "clang/Serialization/GlobalModuleIndex.h" +#include "clang/Serialization/InMemoryModuleCache.h" #include "clang/Serialization/Module.h" #include "clang/Serialization/ModuleFileExtension.h" #include "clang/Serialization/ModuleManager.h" @@ -4291,7 +4291,7 @@ ASTReader::readUnhashedControlBlock(ModuleFile &F, bool WasImportedBy, } if (Result == OutOfDate && F.Kind == MK_ImplicitModule) { - // If this module has already been finalized in the PCMCache, we're stuck + // If this module has already been finalized in the ModuleCache, we're stuck // with it; we can only load a single version of each module. // // This can happen when a module is imported in two contexts: in one, as a @@ -4309,7 +4309,7 @@ ASTReader::readUnhashedControlBlock(ModuleFile &F, bool WasImportedBy, // validation will fail during the as-system import since the PCM on disk // doesn't guarantee that -Werror was respected. However, the -Werror // flags were checked during the initial as-user import. - if (PCMCache.isBufferFinal(F.FileName)) { + if (getModuleManager().getModuleCache().isBufferFinal(F.FileName)) { Diag(diag::warn_module_system_bit_conflict) << F.FileName; return Success; } @@ -11606,7 +11606,8 @@ void ASTReader::pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name) { } } -ASTReader::ASTReader(Preprocessor &PP, ASTContext *Context, +ASTReader::ASTReader(Preprocessor &PP, InMemoryModuleCache &ModuleCache, + ASTContext *Context, const PCHContainerReader &PCHContainerRdr, ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions, StringRef isysroot, bool DisableValidation, @@ -11619,11 +11620,9 @@ ASTReader::ASTReader(Preprocessor &PP, ASTContext *Context, : cast<ASTReaderListener>(new PCHValidator(PP, *this))), SourceMgr(PP.getSourceManager()), FileMgr(PP.getFileManager()), PCHContainerRdr(PCHContainerRdr), Diags(PP.getDiagnostics()), PP(PP), - ContextObj(Context), - ModuleMgr(PP.getFileManager(), PP.getPCMCache(), PCHContainerRdr, - PP.getHeaderSearchInfo()), - PCMCache(PP.getPCMCache()), DummyIdResolver(PP), - ReadTimer(std::move(ReadTimer)), isysroot(isysroot), + ContextObj(Context), ModuleMgr(PP.getFileManager(), ModuleCache, + PCHContainerRdr, PP.getHeaderSearchInfo()), + DummyIdResolver(PP), ReadTimer(std::move(ReadTimer)), isysroot(isysroot), DisableValidation(DisableValidation), AllowASTWithCompilerErrors(AllowASTWithCompilerErrors), AllowConfigurationMismatch(AllowConfigurationMismatch), |