[clang] [clang] Store size & mtime in in-memory module cache (PR #190207)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 2 09:22:31 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-modules
Author: Jan Svoboda (jansvoboda11)
<details>
<summary>Changes</summary>
In this PR, the in-memory module cache now stores the size and modification time of PCM files. This is needed so that the `ModuleManager` doesn't need to consult the file system to obtain this information, which _might_ be in a different state than when we stored the PCM file buffer into the in-memory cache. Based on top of #<!-- -->190062.
---
Patch is 28.50 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/190207.diff
16 Files Affected:
- (modified) clang/include/clang/Basic/LangOptions.def (-1)
- (modified) clang/include/clang/Serialization/ASTWriter.h (+1-4)
- (modified) clang/include/clang/Serialization/InMemoryModuleCache.h (+19-6)
- (modified) clang/include/clang/Serialization/ModuleCache.h (+4-3)
- (modified) clang/include/clang/Serialization/ModuleManager.h (+4-2)
- (modified) clang/lib/DependencyScanning/InProcessModuleCache.cpp (+3-2)
- (modified) clang/lib/Frontend/CompilerInstance.cpp (+16-2)
- (modified) clang/lib/Frontend/FrontendActions.cpp (+2-5)
- (modified) clang/lib/Serialization/ASTReader.cpp (+3-1)
- (modified) clang/lib/Serialization/ASTWriter.cpp (+1-7)
- (modified) clang/lib/Serialization/GeneratePCH.cpp (+4-8)
- (modified) clang/lib/Serialization/InMemoryModuleCache.cpp (+13-5)
- (modified) clang/lib/Serialization/ModuleCache.cpp (+13-3)
- (modified) clang/lib/Serialization/ModuleManager.cpp (+9-24)
- (modified) clang/unittests/Frontend/FrontendActionTest.cpp (-38)
- (modified) clang/unittests/Serialization/InMemoryModuleCacheTest.cpp (+22-14)
``````````diff
diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def
index dd4c5a653d38b..6bba142aaf428 100644
--- a/clang/include/clang/Basic/LangOptions.def
+++ b/clang/include/clang/Basic/LangOptions.def
@@ -160,7 +160,6 @@ ENUM_LANGOPT(CompilingModule, CompilingModuleKind, 3, CMK_None, Benign,
"compiling a module interface")
LANGOPT(CompilingPCH, 1, 0, Benign, "building a pch")
LANGOPT(BuildingPCHWithObjectFile, 1, 0, Benign, "building a pch which has a corresponding object file")
-LANGOPT(CacheGeneratedPCH, 1, 0, Benign, "cache generated PCH files in memory")
LANGOPT(PCHInstantiateTemplates, 1, 0, Benign, "instantiate templates while building a PCH")
LANGOPT(ModulesDeclUse , 1, 0, Compatible, "require declaration of module uses")
LANGOPT(ModulesSearchAll , 1, 1, Benign, "searching even non-imported modules to find unresolved references")
diff --git a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h
index c69fa2b5b28a7..95ae8a6ba8c74 100644
--- a/clang/include/clang/Serialization/ASTWriter.h
+++ b/clang/include/clang/Serialization/ASTWriter.h
@@ -733,8 +733,7 @@ class ASTWriter : public ASTDeserializationListener,
/// the module but currently is merely a random 32-bit number.
ASTFileSignature WriteAST(llvm::PointerUnion<Sema *, Preprocessor *> Subject,
StringRef OutputFile, Module *WritingModule,
- StringRef isysroot,
- bool ShouldCacheASTInMemory = false);
+ StringRef isysroot);
/// Emit a token.
void AddToken(const Token &Tok, RecordDataImpl &Record);
@@ -1011,7 +1010,6 @@ class PCHGenerator : public SemaConsumer {
llvm::BitstreamWriter Stream;
ASTWriter Writer;
bool AllowASTWithErrors;
- bool ShouldCacheASTInMemory;
protected:
ASTWriter &getWriter() { return Writer; }
@@ -1033,7 +1031,6 @@ class PCHGenerator : public SemaConsumer {
ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
bool AllowASTWithErrors = false, bool IncludeTimestamps = true,
bool BuildingImplicitModule = false,
- bool ShouldCacheASTInMemory = false,
bool GeneratingReducedBMI = false);
~PCHGenerator() override;
diff --git a/clang/include/clang/Serialization/InMemoryModuleCache.h b/clang/include/clang/Serialization/InMemoryModuleCache.h
index fc3ba334fc64d..5e3fc19c48ff0 100644
--- a/clang/include/clang/Serialization/InMemoryModuleCache.h
+++ b/clang/include/clang/Serialization/InMemoryModuleCache.h
@@ -28,16 +28,24 @@ namespace clang {
/// each \a ModuleManager sees the same files.
class InMemoryModuleCache : public llvm::RefCountedBase<InMemoryModuleCache> {
struct PCM {
+ /// The contents of the PCM as produced by \c ASTWriter.
std::unique_ptr<llvm::MemoryBuffer> Buffer;
+ /// The size of this PCM. This may be different from the size of \c Buffer
+ /// when it's wrapped in an object file.
+ off_t Size = 0;
+
+ /// The modification time of this PCM.
+ time_t ModTime = 0;
+
/// Track whether this PCM is known to be good (either built or
/// successfully imported by a CompilerInstance/ASTReader using this
/// cache).
bool IsFinal = false;
PCM() = default;
- PCM(std::unique_ptr<llvm::MemoryBuffer> Buffer)
- : Buffer(std::move(Buffer)) {}
+ PCM(std::unique_ptr<llvm::MemoryBuffer> Buffer, off_t Size, time_t ModTime)
+ : Buffer(std::move(Buffer)), Size(Size), ModTime(ModTime) {}
};
/// Cache of buffers.
@@ -64,7 +72,8 @@ class InMemoryModuleCache : public llvm::RefCountedBase<InMemoryModuleCache> {
/// \post state is Tentative
/// \return a reference to the buffer as a convenience.
llvm::MemoryBuffer &addPCM(llvm::StringRef Filename,
- std::unique_ptr<llvm::MemoryBuffer> Buffer);
+ std::unique_ptr<llvm::MemoryBuffer> Buffer,
+ off_t Size, time_t ModTime);
/// Store a just-built PCM under the Filename.
///
@@ -72,7 +81,8 @@ class InMemoryModuleCache : public llvm::RefCountedBase<InMemoryModuleCache> {
/// \pre state is not Tentative.
/// \return a reference to the buffer as a convenience.
llvm::MemoryBuffer &addBuiltPCM(llvm::StringRef Filename,
- std::unique_ptr<llvm::MemoryBuffer> Buffer);
+ std::unique_ptr<llvm::MemoryBuffer> Buffer,
+ off_t Size, time_t ModTime);
/// Try to remove a buffer from the cache. No effect if state is Final.
///
@@ -87,8 +97,11 @@ class InMemoryModuleCache : public llvm::RefCountedBase<InMemoryModuleCache> {
/// \post state is Final.
void finalizePCM(llvm::StringRef Filename);
- /// Get a pointer to the pCM if it exists; else nullptr.
- llvm::MemoryBuffer *lookupPCM(llvm::StringRef Filename) const;
+ /// Get a pointer to the PCM if it exists and set \c Size and \c ModTime to
+ /// its on-disk size and modification time. Otherwise, return nullptr and
+ /// don't change \c Size and \c ModTime.
+ llvm::MemoryBuffer *lookupPCM(llvm::StringRef Filename, off_t &Size,
+ time_t &ModTime) const;
/// Check whether the PCM is final and has been shown to work.
///
diff --git a/clang/include/clang/Serialization/ModuleCache.h b/clang/include/clang/Serialization/ModuleCache.h
index 107f87b326008..44c576bbba8be 100644
--- a/clang/include/clang/Serialization/ModuleCache.h
+++ b/clang/include/clang/Serialization/ModuleCache.h
@@ -57,8 +57,8 @@ class ModuleCache {
virtual const InMemoryModuleCache &getInMemoryModuleCache() const = 0;
/// Write the PCM contents to the given path in the module cache.
- virtual std::error_code write(StringRef Path,
- llvm::MemoryBufferRef Buffer) = 0;
+ virtual std::error_code write(StringRef Path, llvm::MemoryBufferRef Buffer,
+ off_t &Size, time_t &ModTime) = 0;
virtual Expected<std::unique_ptr<llvm::MemoryBuffer>>
read(StringRef FileName, off_t &Size, time_t &ModTime) = 0;
@@ -76,7 +76,8 @@ std::shared_ptr<ModuleCache> createCrossProcessModuleCache();
void maybePruneImpl(StringRef Path, time_t PruneInterval, time_t PruneAfter);
/// Shared implementation of `ModuleCache::write()`.
-std::error_code writeImpl(StringRef Path, llvm::MemoryBufferRef Buffer);
+std::error_code writeImpl(StringRef Path, llvm::MemoryBufferRef Buffer,
+ off_t &Size, time_t &ModTime);
/// Shared implementation of `ModuleCache::read()`.
Expected<std::unique_ptr<llvm::MemoryBuffer>>
diff --git a/clang/include/clang/Serialization/ModuleManager.h b/clang/include/clang/Serialization/ModuleManager.h
index 1ef9aeee7e1fd..80f43ea922a17 100644
--- a/clang/include/clang/Serialization/ModuleManager.h
+++ b/clang/include/clang/Serialization/ModuleManager.h
@@ -73,7 +73,8 @@ class ModuleManager {
/// Preprocessor's HeaderSearchInfo containing the module map.
const HeaderSearch &HeaderSearchInfo;
- /// A lookup of in-memory (virtual file) buffers
+ /// A lookup of in-memory (virtual file) buffers.
+ // FIXME: No need to key this by `FileEntry`.
llvm::DenseMap<const FileEntry *, std::unique_ptr<llvm::MemoryBuffer>>
InMemoryBuffers;
@@ -182,7 +183,8 @@ class ModuleManager {
ModuleFile *lookup(ModuleFileKey Key) const;
/// Returns the in-memory (virtual file) buffer with the given name
- std::unique_ptr<llvm::MemoryBuffer> lookupBuffer(StringRef Name);
+ std::unique_ptr<llvm::MemoryBuffer> lookupBuffer(StringRef Name, off_t &Size,
+ time_t &ModTime);
/// Number of modules loaded
unsigned size() const { return Chain.size(); }
diff --git a/clang/lib/DependencyScanning/InProcessModuleCache.cpp b/clang/lib/DependencyScanning/InProcessModuleCache.cpp
index 0565f5eebfe04..6ef20a8806b8c 100644
--- a/clang/lib/DependencyScanning/InProcessModuleCache.cpp
+++ b/clang/lib/DependencyScanning/InProcessModuleCache.cpp
@@ -134,13 +134,14 @@ class InProcessModuleCache : public ModuleCache {
return InMemory;
}
- std::error_code write(StringRef Path, llvm::MemoryBufferRef Buffer) override {
+ std::error_code write(StringRef Path, llvm::MemoryBufferRef Buffer,
+ off_t &Size, time_t &ModTime) override {
// This is a compiler-internal input/output, let's bypass the sandbox.
auto BypassSandbox = llvm::sys::sandbox::scopedDisable();
// FIXME: This could use an in-memory cache to avoid IO, and only write to
// disk at the end of the scan.
- return writeImpl(Path, Buffer);
+ return writeImpl(Path, Buffer, Size, ModTime);
}
Expected<std::unique_ptr<llvm::MemoryBuffer>>
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index dbeafaea19ba4..19ee7a01d7974 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1470,8 +1470,10 @@ static bool compileModuleImpl(CompilerInstance &ImportingInstance,
}
}
- std::error_code EC =
- ImportingInstance.getModuleCache().write(ModuleFileName, *Buffer);
+ off_t Size;
+ time_t ModTime;
+ std::error_code EC = ImportingInstance.getModuleCache().write(
+ ModuleFileName, *Buffer, Size, ModTime);
if (EC) {
ImportingInstance.getDiagnostics().Report(ModuleNameLoc,
diag::err_module_not_written)
@@ -1488,6 +1490,18 @@ static bool compileModuleImpl(CompilerInstance &ImportingInstance,
ImportingInstance.getModuleCache().updateModuleTimestamp(ModuleFileName);
}
+ // This isn't strictly necessary, but it's more efficient to extract the AST
+ // file (which may be wrapped in an object file) now rather than doing so
+ // repeatedly in the readers.
+ const PCHContainerReader &Rdr = ImportingInstance.getPCHContainerReader();
+ StringRef ExtractedBuffer = Rdr.ExtractPCH(*Buffer);
+ // FIXME: Avoid the copy here by having InMemoryModuleCache accept both the
+ // owning buffer and the StringRef.
+ Buffer = llvm::MemoryBuffer::getMemBufferCopy(ExtractedBuffer);
+
+ ImportingInstance.getModuleCache().getInMemoryModuleCache().addBuiltPCM(
+ ModuleFileName, std::move(Buffer), Size, ModTime);
+
return true;
}
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 42f1ae3d83ed3..007393fa857e1 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -142,8 +142,7 @@ GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
CI.getPreprocessor(), CI.getModuleCache(), OutputFile, Sysroot, Buffer,
CI.getCodeGenOpts(), FrontendOpts.ModuleFileExtensions,
CI.getPreprocessorOpts().AllowPCHWithCompilerErrors,
- FrontendOpts.IncludeTimestamps, FrontendOpts.BuildingImplicitModule,
- +CI.getLangOpts().CacheGeneratedPCH));
+ FrontendOpts.IncludeTimestamps, FrontendOpts.BuildingImplicitModule));
Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI, std::string(InFile), OutputFile, std::move(OS), Buffer));
@@ -207,9 +206,7 @@ GenerateModuleAction::CreateMultiplexConsumer(CompilerInstance &CI,
/*IncludeTimestamps=*/
+CI.getFrontendOpts().BuildingImplicitModule &&
+CI.getFrontendOpts().IncludeTimestamps,
- /*BuildingImplicitModule=*/+CI.getFrontendOpts().BuildingImplicitModule,
- /*ShouldCacheASTInMemory=*/
- +CI.getFrontendOpts().BuildingImplicitModule));
+ /*BuildingImplicitModule=*/+CI.getFrontendOpts().BuildingImplicitModule));
Consumers.push_back(CI.getPCHContainerWriter().CreatePCHContainerGenerator(
CI, std::string(InFile), OutputFile, std::move(OS), Buffer));
return Consumers;
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index b211b0d32e1de..45a0feb99f54f 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -5934,9 +5934,11 @@ bool ASTReader::readASTFileControlBlock(
ASTReaderListener &Listener, bool ValidateDiagnosticOptions,
unsigned ClientLoadCapabilities) {
// Open the AST file.
+ off_t Size;
+ time_t ModTime;
std::unique_ptr<llvm::MemoryBuffer> OwnedBuffer;
llvm::MemoryBuffer *Buffer =
- ModCache.getInMemoryModuleCache().lookupPCM(Filename);
+ ModCache.getInMemoryModuleCache().lookupPCM(Filename, Size, ModTime);
if (!Buffer) {
// FIXME: We should add the pcm to the InMemoryModuleCache if it could be
// read again later, but we do not have the context here to determine if it
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 20a01f86e95ac..4b3adce07f10c 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -5496,7 +5496,7 @@ time_t ASTWriter::getTimestampForOutput(time_t ModTime) const {
ASTFileSignature
ASTWriter::WriteAST(llvm::PointerUnion<Sema *, Preprocessor *> Subject,
StringRef OutputFile, Module *WritingModule,
- StringRef isysroot, bool ShouldCacheASTInMemory) {
+ StringRef isysroot) {
llvm::TimeTraceScope scope("WriteAST", OutputFile);
WritingAST = true;
@@ -5523,12 +5523,6 @@ ASTWriter::WriteAST(llvm::PointerUnion<Sema *, Preprocessor *> Subject,
WritingAST = false;
- if (ShouldCacheASTInMemory) {
- // Construct MemoryBuffer and update buffer manager.
- ModCache.getInMemoryModuleCache().addBuiltPCM(
- OutputFile, llvm::MemoryBuffer::getMemBufferCopy(
- StringRef(Buffer.begin(), Buffer.size())));
- }
return Signature;
}
diff --git a/clang/lib/Serialization/GeneratePCH.cpp b/clang/lib/Serialization/GeneratePCH.cpp
index f8be0e45078db..8bc7e1782c2d9 100644
--- a/clang/lib/Serialization/GeneratePCH.cpp
+++ b/clang/lib/Serialization/GeneratePCH.cpp
@@ -28,14 +28,12 @@ PCHGenerator::PCHGenerator(
const CodeGenOptions &CodeGenOpts,
ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
bool AllowASTWithErrors, bool IncludeTimestamps,
- bool BuildingImplicitModule, bool ShouldCacheASTInMemory,
- bool GeneratingReducedBMI)
+ bool BuildingImplicitModule, bool GeneratingReducedBMI)
: PP(PP), Subject(&PP), OutputFile(OutputFile), isysroot(isysroot.str()),
Buffer(std::move(Buffer)), Stream(this->Buffer->Data),
Writer(Stream, this->Buffer->Data, ModCache, CodeGenOpts, Extensions,
IncludeTimestamps, BuildingImplicitModule, GeneratingReducedBMI),
- AllowASTWithErrors(AllowASTWithErrors),
- ShouldCacheASTInMemory(ShouldCacheASTInMemory) {
+ AllowASTWithErrors(AllowASTWithErrors) {
this->Buffer->IsComplete = false;
}
@@ -84,8 +82,7 @@ void PCHGenerator::HandleTranslationUnit(ASTContext &Ctx) {
if (AllowASTWithErrors)
PP.getDiagnostics().getClient()->clear();
- Buffer->Signature = Writer.WriteAST(Subject, OutputFile, Module, isysroot,
- ShouldCacheASTInMemory);
+ Buffer->Signature = Writer.WriteAST(Subject, OutputFile, Module, isysroot);
Buffer->IsComplete = true;
}
@@ -111,8 +108,7 @@ CXX20ModulesGenerator::CXX20ModulesGenerator(Preprocessor &PP,
std::make_shared<PCHBuffer>(), CodeGenOpts,
/*Extensions=*/ArrayRef<std::shared_ptr<ModuleFileExtension>>(),
AllowASTWithErrors, /*IncludeTimestamps=*/false,
- /*BuildingImplicitModule=*/false, /*ShouldCacheASTInMemory=*/false,
- GeneratingReducedBMI) {}
+ /*BuildingImplicitModule=*/false, GeneratingReducedBMI) {}
Module *CXX20ModulesGenerator::getEmittingModule(ASTContext &Ctx) {
Module *M = Ctx.getCurrentNamedModule();
diff --git a/clang/lib/Serialization/InMemoryModuleCache.cpp b/clang/lib/Serialization/InMemoryModuleCache.cpp
index d35fa2a807f4d..dcd6395434c16 100644
--- a/clang/lib/Serialization/InMemoryModuleCache.cpp
+++ b/clang/lib/Serialization/InMemoryModuleCache.cpp
@@ -23,28 +23,36 @@ InMemoryModuleCache::getPCMState(llvm::StringRef Filename) const {
llvm::MemoryBuffer &
InMemoryModuleCache::addPCM(llvm::StringRef Filename,
- std::unique_ptr<llvm::MemoryBuffer> Buffer) {
- auto Insertion = PCMs.insert(std::make_pair(Filename, std::move(Buffer)));
+ std::unique_ptr<llvm::MemoryBuffer> Buffer,
+ off_t Size, time_t ModTime) {
+ auto Insertion = PCMs.insert(
+ std::make_pair(Filename, PCM(std::move(Buffer), Size, ModTime)));
assert(Insertion.second && "Already has a PCM");
return *Insertion.first->second.Buffer;
}
llvm::MemoryBuffer &
InMemoryModuleCache::addBuiltPCM(llvm::StringRef Filename,
- std::unique_ptr<llvm::MemoryBuffer> Buffer) {
+ std::unique_ptr<llvm::MemoryBuffer> Buffer,
+ off_t Size, time_t ModTime) {
auto &PCM = PCMs[Filename];
assert(!PCM.IsFinal && "Trying to override finalized PCM?");
assert(!PCM.Buffer && "Trying to override tentative PCM?");
PCM.Buffer = std::move(Buffer);
+ PCM.Size = Size;
+ PCM.ModTime = ModTime;
PCM.IsFinal = true;
return *PCM.Buffer;
}
-llvm::MemoryBuffer *
-InMemoryModuleCache::lookupPCM(llvm::StringRef Filename) const {
+llvm::MemoryBuffer *InMemoryModuleCache::lookupPCM(llvm::StringRef Filename,
+ off_t &Size,
+ time_t &ModTime) const {
auto I = PCMs.find(Filename);
if (I == PCMs.end())
return nullptr;
+ Size = I->second.Size;
+ ModTime = I->second.ModTime;
return I->second.Buffer.get();
}
diff --git a/clang/lib/Serialization/ModuleCache.cpp b/clang/lib/Serialization/ModuleCache.cpp
index bd57f4322669b..9b576a6614fcb 100644
--- a/clang/lib/Serialization/ModuleCache.cpp
+++ b/clang/lib/Serialization/ModuleCache.cpp
@@ -102,7 +102,8 @@ void clang::maybePruneImpl(StringRef Path, time_t PruneInterval,
}
}
-std::error_code clang::writeImpl(StringRef Path, llvm::MemoryBufferRef Buffer) {
+std::error_code clang::writeImpl(StringRef Path, llvm::MemoryBufferRef Buffer,
+ off_t &Size, time_t &ModTime) {
StringRef Extension = llvm::sys::path::extension(Path);
SmallString<128> ModelPath = StringRef(Path).drop_back(Extension.size());
ModelPath += "-%%%%%%%%";
@@ -124,11 +125,19 @@ std::error_code clang::writeImpl(StringRef Path, llvm::MemoryBufferRef Buffer) {
return EC;
}
+ llvm::sys::fs::file_status Status;
{
llvm::raw_fd_ostream OS(FD, /*shouldClose=*/true);
OS << Buffer.getBuffer();
+ // Using the status from an open file descriptor ensures this is not racy.
+ if ((EC = llvm::sys::fs::status(FD, Status)))
+ return EC;
}
+ Size = Status.getSize();
+ ModTime = llvm::sys::toTimeT(Status.getLastModificationTime());
+
+ // This preserves both size and modification time.
if ((EC = llvm::sys::fs::rename(TmpPath, Path)))
return EC;
@@ -215,11 +224,12 @@ class CrossProcessModuleCache : public ModuleCache {
return InMemory;
}
- std::error_code write(StringRef Path, llvm::MemoryBufferRef Buffer) override {
+ std::error_code write(StringRef Path, llvm::MemoryBufferRef Buffer,
+ off_t &Size, time_t &ModTime) override {
// This is a compiler-internal input/output, let's bypass the sandbox.
auto BypassSandbox = llvm::sys::sandbox::scopedDisable();
- return writeImpl(Path, Buffer);
+ return writeImpl(Path, Buffer, Size, ModTime);
}
Expected<std::unique_ptr<llvm::MemoryBuffer>>
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp
index 022e2ef42f635..b7d0ee85bc05e 100644
--- a/clang/lib/Serialization/ModuleManager.cpp
+++ b/clang/lib/Serialization/ModuleManager.cpp
@@ -59,11 +59,13 @@ ModuleFile *ModuleManager::lookup(ModuleFileKey Key) const {
}
std::unique_ptr<llvm::MemoryBuffer>
-ModuleManager::lookupBuffer(StringRef Name) {
+ModuleManager::lookupBuffer(StringRef Name, off_t &Size, time_t &ModTime) {
auto Entry = File...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/190207
More information about the cfe-commits
mailing list