diff options
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r-- | include/clang/Frontend/ASTConsumers.h | 6 | ||||
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 7 | ||||
-rw-r--r-- | include/clang/Frontend/CompilerInvocation.h | 9 | ||||
-rw-r--r-- | include/clang/Frontend/FrontendOptions.h | 7 |
4 files changed, 20 insertions, 9 deletions
diff --git a/include/clang/Frontend/ASTConsumers.h b/include/clang/Frontend/ASTConsumers.h index cd35638f2c..0e7d55e6e4 100644 --- a/include/clang/Frontend/ASTConsumers.h +++ b/include/clang/Frontend/ASTConsumers.h @@ -25,11 +25,12 @@ namespace llvm { namespace clang { class ASTConsumer; +class CodeGenOptions; class Diagnostic; class FileManager; -class Preprocessor; -class CodeGenOptions; class LangOptions; +class Preprocessor; +class TargetOptions; // AST pretty-printer: prints out the AST in a format that is close to the // original C code. The output is intended to be in a format such that @@ -81,6 +82,7 @@ ASTConsumer *CreateBackendConsumer(BackendAction Action, Diagnostic &Diags, const LangOptions &Features, const CodeGenOptions &CodeGenOpts, + const TargetOptions &TargetOpts, const std::string &ModuleID, llvm::raw_ostream *OS, llvm::LLVMContext& C); diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 915755558e..ed28050877 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -191,6 +191,13 @@ public: return Invocation.getPreprocessorOutputOpts(); } + TargetOptions &getTargetOpts() { + return Invocation.getTargetOpts(); + } + const TargetOptions &getTargetOpts() const { + return Invocation.getTargetOpts(); + } + /// } /// @name Diagnostics Engine /// { diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h index fc0497a7ac..0cdb32b006 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/Basic/TargetOptions.h" #include "clang/CodeGen/CodeGenOptions.h" #include "clang/Frontend/AnalysisConsumer.h" #include "clang/Frontend/DependencyOutputOptions.h" @@ -58,6 +59,9 @@ class CompilerInvocation { /// Options controlling preprocessed output. PreprocessorOutputOptions PreprocessorOutputOpts; + /// Options controlling the target. + TargetOptions TargetOpts; + public: CompilerInvocation() {} @@ -110,6 +114,11 @@ public: return PreprocessorOutputOpts; } + TargetOptions &getTargetOpts() { return TargetOpts; } + const TargetOptions &getTargetOpts() const { + return TargetOpts; + } + /// @} }; diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h index 67656067fc..f03b9d2b3a 100644 --- a/include/clang/Frontend/FrontendOptions.h +++ b/include/clang/Frontend/FrontendOptions.h @@ -85,13 +85,6 @@ public: unsigned ShowTimers : 1; ///< Show timers for individual /// actions. - /// If given, the name of the target triple to compile for. If not given the - /// target will be selected to match the host. - std::string TargetTriple; - - /// If given, the name of the target ABI to use. - std::string TargetABI; - /// The input files and their types. std::vector<std::pair<InputKind, std::string> > Inputs; |