clang  10.0.0git
DependencyScanningTool.h
Go to the documentation of this file.
1 //===- DependencyScanningTool.h - clang-scan-deps service -----------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_TOOLING_DEPENDENCY_SCANNING_TOOL_H
10 #define LLVM_CLANG_TOOLING_DEPENDENCY_SCANNING_TOOL_H
11 
15 #include <string>
16 
17 namespace clang{
18 namespace tooling{
19 namespace dependencies{
20 
21 /// The high-level implementation of the dependency discovery tool that runs on
22 /// an individual worker thread.
24 public:
25  /// Construct a dependency scanning tool.
27 
28  /// Print out the dependency information into a string using the dependency
29  /// file format that is specified in the options (-MD is the default) and
30  /// return it.
31  ///
32  /// \returns A \c StringError with the diagnostic output if clang errors
33  /// occurred, dependency file contents otherwise.
36  StringRef CWD);
37 
38 private:
39  const ScanningOutputFormat Format;
41 };
42 
43 } // end namespace dependencies
44 } // end namespace tooling
45 } // end namespace clang
46 
47 #endif // LLVM_CLANG_TOOLING_DEPENDENCY_SCANNING_TOOL_H
DependencyScanningTool(DependencyScanningService &Service)
Construct a dependency scanning tool.
llvm::Expected< std::string > getDependencyFile(const tooling::CompilationDatabase &Compilations, StringRef CWD)
Print out the dependency information into a string using the dependency file format that is specified...
The dependency scanning service contains the shared state that is used by the invidual dependency sca...
The high-level implementation of the dependency discovery tool that runs on an individual worker thre...
Interface for compilation databases.
An individual dependency scanning worker that is able to run on its own thread.
Dataflow Directional Tag Classes.
ScanningOutputFormat
The format that is output by the dependency scanner.