summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-05-20 21:25:41 +0000
committerEric Christopher <echristo@gmail.com>2014-05-20 21:25:41 +0000
commitacca0085c114579a9394c2525415e6a0f77e0820 (patch)
tree3a476869c59c86c3febc033c29162f4ae634332f /clang/lib/CodeGen
parent2feed5fd6869ccb6a0fc9b034372917f2ba36ad4 (diff)
downloadbcm5719-llvm-acca0085c114579a9394c2525415e6a0f77e0820.tar.gz
bcm5719-llvm-acca0085c114579a9394c2525415e6a0f77e0820.zip
Update for llvm change to avoid having global flag setting in TargetMachine.
llvm-svn: 209239
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 1a5213ee8f5..16a8c0efa4a 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud