9#ifndef LLVM_CLANG_TOOLING_DEPENDENCYSCANNING_DEPENDENCYSCANNINGTOOL_H
10#define LLVM_CLANG_TOOLING_DEPENDENCYSCANNING_DEPENDENCYSCANNINGTOOL_H
16#include "llvm/ADT/DenseSet.h"
17#include "llvm/ADT/MapVector.h"
18#include "llvm/ADT/STLExtras.h"
95 llvm::vfs::createPhysicalFileSystem());
119 StringRef CWD, std::string &MakeformatOutput,
120 std::string &MakeformatOutputPath);
124 std::string MakeformatOutput;
125 std::string MakeformatOutputPath;
128 MakeformatOutputPath);
149 const std::vector<std::string> &CommandLine, StringRef CWD,
150 const llvm::DenseSet<ModuleID> &AlreadySeen,
152 std::optional<llvm::MemoryBufferRef> TUBuffer = std::nullopt);
161 StringRef ModuleName,
const std::vector<std::string> &CommandLine,
162 StringRef CWD,
const llvm::DenseSet<ModuleID> &AlreadySeen,
177 StringRef CWD,
const std::vector<std::string> &CommandLine);
194 StringRef ModuleName,
const llvm::DenseSet<ModuleID> &AlreadySeen,
203 llvm::vfs::FileSystem &
getWorkerVFS()
const {
return Worker.getVFS(); }
212 : AlreadySeen(AlreadySeen) {}
215 Commands.push_back(std::move(Cmd));
221 Dependencies.push_back(std::string(
File));
225 PrebuiltModuleDeps.emplace_back(std::move(PMD));
229 ClangModuleDeps[MD.
ID] = std::move(MD);
233 DirectModuleDeps.push_back(ID);
237 VisibleModules.push_back(ModuleName);
241 ContextHash = std::move(Hash);
245 std::optional<P1689ModuleInfo> Provided,
246 std::vector<P1689ModuleInfo> Requires)
override {
247 ModuleName = Provided ? Provided->ModuleName :
"";
248 llvm::transform(Requires, std::back_inserter(NamedModuleDeps),
255 std::vector<std::string> Dependencies;
256 std::vector<PrebuiltModuleDep> PrebuiltModuleDeps;
257 llvm::MapVector<ModuleID, ModuleDeps> ClangModuleDeps;
258 std::string ModuleName;
259 std::vector<std::string> NamedModuleDeps;
260 std::vector<ModuleID> DirectModuleDeps;
261 std::vector<std::string> VisibleModules;
262 std::vector<Command> Commands;
263 std::string ContextHash;
264 const llvm::DenseSet<ModuleID> &AlreadySeen;
275 llvm::report_fatal_error(
"unexpected call to lookupModuleOutput");
279 : LookupModuleOutput(
std::move(LMO)) {
280 if (!LookupModuleOutput) {
287 return LookupModuleOutput(MD, Kind);
DependencyOutputOptions - Options for controlling the compiler dependency file generation.
Describes a module or submodule.
The JSON file list parser is used to communicate input to InstallAPI.
@ Worker
'worker' clause, allowed on 'loop', Combined, and 'routine' directives.