9#ifndef LLVM_CLANG_TOOLING_DEPENDENCYSCANNING_DEPENDENCYSCANNER_H
10#define LLVM_CLANG_TOOLING_DEPENDENCYSCANNING_DEPENDENCYSCANNER_H
36 std::optional<StringRef> ModuleName = std::nullopt)
37 : Service(Service), WorkingDirectory(WorkingDirectory),
38 Consumer(Consumer), Controller(Controller), DepFS(
std::move(DepFS)),
39 ModuleName(ModuleName) {}
40 bool runInvocation(std::unique_ptr<CompilerInvocation> Invocation,
42 std::shared_ptr<PCHContainerOperations> PCHContainerOps,
52 std::vector<std::string>
Result;
53 std::swap(
Result, LastCC1Arguments);
60 MDC->applyDiscoveredDependencies(CI);
61 LastCC1Arguments = CI.getCC1CommandLine();
64 DependencyScanningService &Service;
65 StringRef WorkingDirectory;
66 DependencyConsumer &Consumer;
67 DependencyActionController &Controller;
69 std::optional<StringRef> ModuleName;
70 std::optional<CompilerInstance> ScanInstanceStorage;
71 std::shared_ptr<ModuleDepCollector> MDC;
72 std::vector<std::string> LastCC1Arguments;
74 bool DiagConsumerFinished =
false;
78std::unique_ptr<DiagnosticOptions>
106std::pair<std::unique_ptr<driver::Driver>, std::unique_ptr<driver::Compilation>>
110std::unique_ptr<CompilerInvocation>
114std::pair<IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::vector<std::string>>
117 StringRef WorkingDirectory,
118 llvm::MemoryBufferRef TUBuffer);
120std::pair<IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::vector<std::string>>
123 StringRef WorkingDirectory, StringRef ModuleName);
134std::optional<PrebuiltModulesAttrsMap>
138std::unique_ptr<DependencyOutputOptions>
146 std::unique_ptr<DependencyOutputOptions> DepOutputOpts,
147 StringRef WorkingDirectory, DependencyConsumer &Consumer,
149 DependencyActionController &Controller,
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Helper class for holding the data necessary to invoke the compiler.
Abstract interface, implemented by clients of the front-end, which formats and prints fully processed...
Concrete class used by the front-end to report problems and issues.
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
std::string DiagnosticOutput
TextDiagnosticPrinter DiagPrinter
std::unique_ptr< DiagnosticOptions > DiagOpts
TextDiagnosticsPrinterWithOutput(ArrayRef< std::string > CommandLine)
llvm::raw_string_ostream DiagnosticsOS