[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)
Qiongsi Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 3 09:33:23 PST 2025
================
@@ -150,6 +151,54 @@ std::shared_ptr<ModuleDepCollector> initializeScanInstanceDependencyCollector(
DependencyActionController &Controller,
PrebuiltModulesAttrsMap PrebuiltModulesASTMap,
llvm::SmallVector<StringRef> &StableDirs);
+
+class CompilerInstanceWithContext {
+ // Context
+ DependencyScanningWorker &Worker;
+ llvm::StringRef CWD;
+ std::vector<std::string> CommandLine;
+ static const uint64_t MAX_NUM_NAMES = (1 << 12);
+ static const std::string FakeFileBuffer;
----------------
qiongsiwu wrote:
I tested out a few scenarios, and it seems that things work all right with even an empty string buffer, so I removed this fake file buffer altogether.
https://github.com/llvm/llvm-project/pull/164345
More information about the cfe-commits
mailing list