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);
158 StringRef ModuleName,
const std::vector<std::string> &CommandLine,
159 StringRef CWD,
const llvm::DenseSet<ModuleID> &AlreadySeen,
162 llvm::vfs::FileSystem &
getWorkerVFS()
const {
return Worker.getVFS(); }
171 : AlreadySeen(AlreadySeen) {}
174 Commands.push_back(std::move(Cmd));
180 Dependencies.push_back(std::string(
File));
184 PrebuiltModuleDeps.emplace_back(std::move(PMD));
188 ClangModuleDeps[MD.
ID] = std::move(MD);
192 DirectModuleDeps.push_back(ID);
196 VisibleModules.push_back(ModuleName);
200 ContextHash = std::move(Hash);
204 std::optional<P1689ModuleInfo> Provided,
205 std::vector<P1689ModuleInfo> Requires)
override {
206 ModuleName = Provided ? Provided->ModuleName :
"";
207 llvm::transform(Requires, std::back_inserter(NamedModuleDeps),
214 std::vector<std::string> Dependencies;
215 std::vector<PrebuiltModuleDep> PrebuiltModuleDeps;
216 llvm::MapVector<ModuleID, ModuleDeps> ClangModuleDeps;
217 std::string ModuleName;
218 std::vector<std::string> NamedModuleDeps;
219 std::vector<ModuleID> DirectModuleDeps;
220 std::vector<std::string> VisibleModules;
221 std::vector<Command> Commands;
222 std::string ContextHash;
223 std::vector<std::string> OutputPaths;
224 const llvm::DenseSet<ModuleID> &AlreadySeen;
235 llvm::report_fatal_error(
"unexpected call to lookupModuleOutput");
239 : LookupModuleOutput(
std::move(LMO)) {
240 if (!LookupModuleOutput) {
247 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.