]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h
Merged ^/head r283871 through r284187.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Frontend / DependencyOutputOptions.h
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 /// DependencyOutputFormat - Format for the compiler dependency file.
19 enum class DependencyOutputFormat { Make, NMake };
20
21 /// DependencyOutputOptions - Options for controlling the compiler dependency
22 /// file generation.
23 class DependencyOutputOptions {
24 public:
25   unsigned IncludeSystemHeaders : 1; ///< Include system header dependencies.
26   unsigned ShowHeaderIncludes : 1;   ///< Show header inclusions (-H).
27   unsigned UsePhonyTargets : 1;      ///< Include phony targets for each
28                                      /// dependency, which can avoid some 'make'
29                                      /// problems.
30   unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list
31   unsigned PrintShowIncludes : 1; ///< Print cl.exe style /showIncludes info.
32   unsigned IncludeModuleFiles : 1; ///< Include module file dependencies.
33
34   /// The format for the dependency file.
35   DependencyOutputFormat OutputFormat;
36
37   /// The file to write dependency output to.
38   std::string OutputFile;
39
40   /// The file to write header include output to. This is orthogonal to
41   /// ShowHeaderIncludes (-H) and will include headers mentioned in the
42   /// predefines buffer. If the output file is "-", output will be sent to
43   /// stderr.
44   std::string HeaderIncludeOutputFile;
45
46   /// A list of names to use as the targets in the dependency file; this list
47   /// must contain at least one entry.
48   std::vector<std::string> Targets;
49
50   /// \brief The file to write GraphViz-formatted header dependencies to.
51   std::string DOTOutputFile;
52
53   /// \brief The directory to copy module dependencies to when collecting them.
54   std::string ModuleDependencyOutputDir;
55
56 public:
57   DependencyOutputOptions() {
58     IncludeSystemHeaders = 0;
59     ShowHeaderIncludes = 0;
60     UsePhonyTargets = 0;
61     AddMissingHeaderDeps = 0;
62     PrintShowIncludes = 0;
63     IncludeModuleFiles = 0;
64     OutputFormat = DependencyOutputFormat::Make;
65   }
66 };
67
68 }  // end namespace clang
69
70 #endif