diff options
| author | Eric Christopher <echristo@gmail.com> | 2014-05-20 21:25:41 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2014-05-20 21:25:41 +0000 |
| commit | addbfc942181c163fe2fb2e436dcbcf0594ded1d (patch) | |
| tree | 1ef7762b1d7ee5e2c31951489ae5405d1bb01155 /lib/CodeGen/BackendUtil.cpp | |
| parent | 4bc6889c26c1dfee402b05b383c2badbcb73fcfa (diff) | |
| download | clang-addbfc942181c163fe2fb2e436dcbcf0594ded1d.tar.gz clang-addbfc942181c163fe2fb2e436dcbcf0594ded1d.tar.bz2 clang-addbfc942181c163fe2fb2e436dcbcf0594ded1d.tar.xz | |
Update for llvm change to avoid having global flag setting in TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
| -rw-r--r-- | lib/CodeGen/BackendUtil.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 1a5213ee8f..16a8c0efa4 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -376,9 +376,6 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) { TargetMachine::setAsmVerbosityDefault(CodeGenOpts.AsmVerbose); - TargetMachine::setFunctionSections(CodeGenOpts.FunctionSections); - TargetMachine::setDataSections (CodeGenOpts.DataSections); - unsigned CodeModel = llvm::StringSwitch<unsigned>(CodeGenOpts.CodeModel) .Case("small", llvm::CodeModel::Small) @@ -491,6 +488,8 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) { Options.DisableTailCalls = CodeGenOpts.DisableTailCalls; Options.TrapFuncName = CodeGenOpts.TrapFuncName; Options.PositionIndependentExecutable = LangOpts.PIELevel != 0; + Options.FunctionSections = CodeGenOpts.FunctionSections; + Options.DataSections = CodeGenOpts.DataSections; Options.MCOptions.MCRelaxAll = CodeGenOpts.RelaxAll; Options.MCOptions.MCSaveTempLabels = CodeGenOpts.SaveTempLabels; |
