Coverage Report

Created: 2018-09-25 23:22

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h
Line
Count
Source
1
//===--- DependencyOutputOptions.h ------------------------------*- C++ -*-===//
2
//
3
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#ifndef LLVM_CLANG_FRONTEND_DEPENDENCYOUTPUTOPTIONS_H
11
#define LLVM_CLANG_FRONTEND_DEPENDENCYOUTPUTOPTIONS_H
12
13
#include <string>
14
#include <vector>
15
16
namespace clang {
17
18
/// ShowIncludesDestination - Destination for /showIncludes output.
19
enum class ShowIncludesDestination { None, Stdout, Stderr };
20
21
/// DependencyOutputFormat - Format for the compiler dependency file.
22
enum class DependencyOutputFormat { Make, NMake };
23
24
/// DependencyOutputOptions - Options for controlling the compiler dependency
25
/// file generation.
26
class DependencyOutputOptions {
27
public:
28
  unsigned IncludeSystemHeaders : 1; ///< Include system header dependencies.
29
  unsigned ShowHeaderIncludes : 1;   ///< Show header inclusions (-H).
30
  unsigned UsePhonyTargets : 1;      ///< Include phony targets for each
31
                                     /// dependency, which can avoid some 'make'
32
                                     /// problems.
33
  unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list
34
  unsigned IncludeModuleFiles : 1; ///< Include module file dependencies.
35
36
  /// Destination of cl.exe style /showIncludes info.
37
  ShowIncludesDestination ShowIncludesDest = ShowIncludesDestination::None;
38
39
  /// The format for the dependency file.
40
  DependencyOutputFormat OutputFormat = DependencyOutputFormat::Make;
41
42
  /// The file to write dependency output to.
43
  std::string OutputFile;
44
45
  /// The file to write header include output to. This is orthogonal to
46
  /// ShowHeaderIncludes (-H) and will include headers mentioned in the
47
  /// predefines buffer. If the output file is "-", output will be sent to
48
  /// stderr.
49
  std::string HeaderIncludeOutputFile;
50
51
  /// A list of names to use as the targets in the dependency file; this list
52
  /// must contain at least one entry.
53
  std::vector<std::string> Targets;
54
55
  /// A list of filenames to be used as extra dependencies for every target.
56
  std::vector<std::string> ExtraDeps;
57
58
  /// In /showIncludes mode, pretend the main TU is a header with this name.
59
  std::string ShowIncludesPretendHeader;
60
61
  /// The file to write GraphViz-formatted header dependencies to.
62
  std::string DOTOutputFile;
63
64
  /// The directory to copy module dependencies to when collecting them.
65
  std::string ModuleDependencyOutputDir;
66
67
public:
68
  DependencyOutputOptions()
69
      : IncludeSystemHeaders(0), ShowHeaderIncludes(0), UsePhonyTargets(0),
70
51.3k
        AddMissingHeaderDeps(0), IncludeModuleFiles(0) {}
71
};
72
73
}  // end namespace clang
74
75
#endif