diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-10 16:19:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-10 16:19:45 +0000 |
commit | 36f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5 (patch) | |
tree | 1c02ee45f154f25f440b5e3cf9d08b1cbff3f870 /include/clang/Frontend/CompilerInvocation.h | |
parent | d9f01d47dbede88fe557c8955ba2a855be859bc9 (diff) |
Add CompileOptions to CompilerInvocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInvocation.h')
-rw-r--r-- | include/clang/Frontend/CompilerInvocation.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h index b249ce9077..c2a66bdf1d 100644 --- a/include/clang/Frontend/CompilerInvocation.h +++ b/include/clang/Frontend/CompilerInvocation.h @@ -11,6 +11,7 @@ #define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_ #include "clang/Basic/LangOptions.h" +#include "clang/Frontend/CompileOptions.h" #include "clang/Frontend/DiagnosticOptions.h" #include "clang/Frontend/HeaderSearchOptions.h" #include "clang/Frontend/PreprocessorOptions.h" @@ -26,9 +27,8 @@ namespace clang { /// compiler, including data such as the include paths, the code generation /// options, the warning flags, and so on. class CompilerInvocation { - /// The location for the output file. This is optional only for compiler - /// invocations which have no output. - std::string OutputFile; + /// Options controlling IRgen and the backend. + CompileOptions CompileOpts; /// Options controlling the diagnostic engine. DiagnosticOptions DiagOpts; @@ -42,15 +42,36 @@ class CompilerInvocation { /// Options controlling the preprocessor (aside from #include handling). PreprocessorOptions PreprocessorOpts; + /// The location for the output file. This is optional only for compiler + /// invocations which have no output. + std::string OutputFile; + /// Set of target-specific code generation features to enable/disable. llvm::StringMap<bool> TargetFeatures; public: CompilerInvocation() {} + /// @name Invidual Options + /// @{ + std::string &getOutputFile() { return OutputFile; } const std::string &getOutputFile() const { return OutputFile; } + llvm::StringMap<bool> &getTargetFeatures() { return TargetFeatures; } + const llvm::StringMap<bool> &getTargetFeatures() const { + return TargetFeatures; + } + + /// @} + /// @name Option Subgroups + /// @{ + + CompileOptions &getCompileOpts() { return CompileOpts; } + const CompileOptions &getCompileOpts() const { + return CompileOpts; + } + DiagnosticOptions &getDiagnosticOpts() { return DiagOpts; } const DiagnosticOptions &getDiagnosticOpts() const { return DiagOpts; } @@ -67,10 +88,7 @@ public: return PreprocessorOpts; } - llvm::StringMap<bool> &getTargetFeatures() { return TargetFeatures; } - const llvm::StringMap<bool> &getTargetFeatures() const { - return TargetFeatures; - } + /// @} }; } // end namespace clang |