diff options
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 |