[PATCH] D138160: [clang] Use InMemoryModuleCache for readASTFileControlBlock NFC

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 16:15:17 PST 2022


benlangmuir created this revision.
benlangmuir added a reviewer: jansvoboda11.
Herald added a project: All.
benlangmuir requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

When a pcm has already been loaded from disk, reuse it from the InMemoryModuleCache in readASTFileControlBlock. This avoids potentially reading it again.

As noted in the FIXME, ideally we would also add the module to the cache if it will be used again later, but that could modify its build state and we do not have enough context currenlty to know if it's correct.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138160

Files:
  clang/include/clang/Serialization/ASTReader.h
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Frontend/FrontendAction.cpp
  clang/lib/Frontend/FrontendActions.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138160.475947.patch
Type: text/x-patch
Size: 8625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221117/f585a66f/attachment-0001.bin>


More information about the cfe-commits mailing list