summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-05-15 01:21:56 +0000
committerEric Christopher <echristo@gmail.com>2014-05-15 01:21:56 +0000
commit8454a4b9373bca5d2a8f596ef1c33826171729bd (patch)
tree5fbad02dab066bdd625175f28630c4baf531e9c4 /lib/CodeGen/BackendUtil.cpp
parentbe8977c750ba797dc880972c2ea9f6f7ef6cb9e3 (diff)
Fill in the options in the MCOptions struct directly like the other
options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r--lib/CodeGen/BackendUtil.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 9ea0a3ab37..79c7e8bd5e 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -492,19 +492,15 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
Options.TrapFuncName = CodeGenOpts.TrapFuncName;
Options.PositionIndependentExecutable = LangOpts.PIELevel != 0;
+ Options.MCOptions.MCRelaxAll = CodeGenOpts.RelaxAll;
+ Options.MCOptions.MCSaveTempLabels = CodeGenOpts.SaveTempLabels;
+ Options.MCOptions.MCUseDwarfDirectory = CodeGenOpts.NoDwarfDirectoryAsm;
+ Options.MCOptions.MCNoExecStack = CodeGenOpts.NoExecStack;
+
TargetMachine *TM = TheTarget->createTargetMachine(Triple, TargetOpts.CPU,
FeaturesStr, Options,
RM, CM, OptLevel);
- if (CodeGenOpts.RelaxAll)
- TM->setMCRelaxAll(true);
- if (CodeGenOpts.SaveTempLabels)
- TM->setMCSaveTempLabels(true);
- if (!CodeGenOpts.NoDwarfDirectoryAsm)
- TM->setMCUseDwarfDirectory(true);
- if (CodeGenOpts.NoExecStack)
- TM->setMCNoExecStack(true);
-
return TM;
}