[clang-tools-extra] [clangd] [Modules] Add VFS to ASTUnit::LoadFromASTFile (PR #113879)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 02:22:09 PDT 2024
================
@@ -127,33 +127,39 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(PathRef ModuleFilePath,
- const PrerequisiteModules &RequisiteModules,
- llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {
+bool IsModuleFileUpToDate(
+ PathRef ModuleFilePath,
+ const PrerequisiteModules &RequisiteModules,
+ const CompilerInvocation &CI,
+ llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS) {
+ CompilerInstance Clang;
----------------
kadircet wrote:
i think you can move all of this CompilerInstance creation logic into `IsModuleFilesUpToDate` and just pass the ASTReader here. that way we can save up a bunch of work/allocations.
https://github.com/llvm/llvm-project/pull/113879
More information about the cfe-commits
mailing list