clang
10.0.0git
include
clang
Tooling
DependencyScanning
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
12
#include "
clang/Tooling/DependencyScanning/DependencyScanningService.h
"
13
#include "
clang/Tooling/DependencyScanning/DependencyScanningWorker.h
"
14
#include "
clang/Tooling/JSONCompilationDatabase.h
"
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.
23
class
DependencyScanningTool
{
24
public
:
25
/// Construct a dependency scanning tool.
26
DependencyScanningTool
(
DependencyScanningService
&Service);
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.
34
llvm::Expected<std::string>
35
getDependencyFile
(
const
tooling::CompilationDatabase
&Compilations,
36
StringRef CWD);
37
38
private
:
39
const
ScanningOutputFormat
Format;
40
DependencyScanningWorker
Worker;
41
};
42
43
}
// end namespace dependencies
44
}
// end namespace tooling
45
}
// end namespace clang
46
47
#endif // LLVM_CLANG_TOOLING_DEPENDENCY_SCANNING_TOOL_H
clang::tooling::dependencies::DependencyScanningTool::DependencyScanningTool
DependencyScanningTool(DependencyScanningService &Service)
Construct a dependency scanning tool.
Definition:
DependencyScanningTool.cpp:25
clang::tooling::dependencies::DependencyScanningTool::getDependencyFile
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...
Definition:
DependencyScanningTool.cpp:30
clang::tooling::dependencies::DependencyScanningService
The dependency scanning service contains the shared state that is used by the invidual dependency sca...
Definition:
DependencyScanningService.h:47
JSONCompilationDatabase.h
llvm::Expected
Definition:
LLVM.h:38
DependencyScanningService.h
clang::tooling::dependencies::DependencyScanningTool
The high-level implementation of the dependency discovery tool that runs on an individual worker thre...
Definition:
DependencyScanningTool.h:23
clang::tooling::CompilationDatabase
Interface for compilation databases.
Definition:
CompilationDatabase.h:87
clang::tooling::dependencies::DependencyScanningWorker
An individual dependency scanning worker that is able to run on its own thread.
Definition:
DependencyScanningWorker.h:51
clang
Dataflow Directional Tag Classes.
Definition:
CFGReachabilityAnalysis.h:21
DependencyScanningWorker.h
clang::tooling::dependencies::ScanningOutputFormat
ScanningOutputFormat
The format that is output by the dependency scanner.
Definition:
DependencyScanningService.h:34
Generated on Thu Feb 13 2020 14:07:28 for clang by
1.8.13