diff options
author | dim <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-07-05 14:23:59 +0000 |
commit | e7bcad327814a78ecb8d5f5545d2e3df84c67a5c (patch) | |
tree | ac719b5984165053bf83d71142e4d96b609b9784 /lib/CodeGen/BackendUtil.cpp | |
parent | 9dd834653b811ad20382e98a87dff824980c9916 (diff) | |
download | FreeBSD-src-e7bcad327814a78ecb8d5f5545d2e3df84c67a5c.zip FreeBSD-src-e7bcad327814a78ecb8d5f5545d2e3df84c67a5c.tar.gz |
Vendor import of clang trunk r241361:
https://llvm.org/svn/llvm-project/cfe/trunk@241361
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | lib/CodeGen/BackendUtil.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index f5edea7..0bccad0 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -536,7 +536,6 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) { Options.NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS; Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath; Options.StackAlignmentOverride = CodeGenOpts.StackAlignment; - Options.TrapFuncName = CodeGenOpts.TrapFuncName; Options.PositionIndependentExecutable = LangOpts.PIELevel != 0; Options.FunctionSections = CodeGenOpts.FunctionSections; Options.DataSections = CodeGenOpts.DataSections; @@ -604,7 +603,10 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, if (!TM) TM.reset(CreateTargetMachine(UsesCodeGen)); - if (UsesCodeGen && !TM) return; + if (UsesCodeGen && !TM) + return; + if (TM) + TheModule->setDataLayout(*TM->getDataLayout()); CreatePasses(); switch (Action) { |