diff options
author | Eric Christopher <echristo@gmail.com> | 2014-05-15 01:21:56 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-05-15 01:21:56 +0000 |
commit | 7e72a0932b1d5bad7677cb575a5be4cef86ebc62 (patch) | |
tree | 4082a7ee0e8b51b996a72a2f5a62742919a97042 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | e6ece1a0c26b03dcfff3923b796f3b91821351d6 (diff) | |
download | bcm5719-llvm-7e72a0932b1d5bad7677cb575a5be4cef86ebc62.tar.gz bcm5719-llvm-7e72a0932b1d5bad7677cb575a5be4cef86ebc62.zip |
Fill in the options in the MCOptions struct directly like the other
options.
llvm-svn: 208834
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 9ea0a3ab37a..79c7e8bd5e2 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/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; } |