diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-14 08:09:20 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-14 08:09:20 +0000 |
commit | e1092dfee2bbcc2243421c553bca488880324280 (patch) | |
tree | ad136c4285521ebb45bdd6b6b98c6b3532c03591 /lib/CodeGen/CodeGenModule.cpp | |
parent | 747836e5c79b5e12fe9cfb9b724dc4edeb115419 (diff) |
Pass the target options through to code generation.
The code generation stuff is going to set attributes on the functions it
generates. To do that it needs the target options. Pass them through.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175141 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index ff2656548e..f725706f71 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -35,6 +35,7 @@ #include "clang/Basic/Module.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Basic/TargetOptions.h" #include "clang/Frontend/CodeGenOptions.h" #include "llvm/ADT/APSInt.h" #include "llvm/ADT/Triple.h" @@ -69,10 +70,11 @@ static CGCXXABI &createCXXABI(CodeGenModule &CGM) { CodeGenModule::CodeGenModule(ASTContext &C, const CodeGenOptions &CGO, - llvm::Module &M, const llvm::DataLayout &TD, + const TargetOptions &TO, llvm::Module &M, + const llvm::DataLayout &TD, DiagnosticsEngine &diags) - : Context(C), LangOpts(C.getLangOpts()), CodeGenOpts(CGO), TheModule(M), - TheDataLayout(TD), TheTargetCodeGenInfo(0), Diags(diags), + : Context(C), LangOpts(C.getLangOpts()), CodeGenOpts(CGO), TargetOpts(TO), + TheModule(M), TheDataLayout(TD), TheTargetCodeGenInfo(0), Diags(diags), ABI(createCXXABI(*this)), Types(*this), TBAA(0), |