aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-05-17 23:06:23 +0000
committerBill Wendling <isanbard@gmail.com>2011-05-17 23:06:23 +0000
commit3621b31cd9255adb1471592ff8116cdc78eb9249 (patch)
treed28e06e567a7423aad80f0a2465260f32ec02818 /lib/CodeGen/BackendUtil.cpp
parent25dba5d294364fa8339091e4d9e6a8f5db008377 (diff)
Conditionalize the use of 4.4 or 4.2 format based on the target.
<rdar://problem/8107317> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r--lib/CodeGen/BackendUtil.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 1264473dab..e6570d4086 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -112,8 +112,8 @@ void EmitAssemblyHelper::CreatePasses() {
FunctionPassManager *FPM = getPerFunctionPasses();
- TargetLibraryInfo *TLI =
- new TargetLibraryInfo(Triple(TheModule->getTargetTriple()));
+ Triple TargetTriple(TheModule->getTargetTriple());
+ TargetLibraryInfo *TLI = new TargetLibraryInfo(TargetTriple);
if (!CodeGenOpts.SimplifyLibCalls)
TLI->disableAllFunctions();
FPM->add(TLI);
@@ -150,14 +150,16 @@ void EmitAssemblyHelper::CreatePasses() {
PassManager *MPM = getPerModulePasses();
- TLI = new TargetLibraryInfo(Triple(TheModule->getTargetTriple()));
+ TLI = new TargetLibraryInfo(TargetTriple);
if (!CodeGenOpts.SimplifyLibCalls)
TLI->disableAllFunctions();
MPM->add(TLI);
if (CodeGenOpts.EmitGcovArcs || CodeGenOpts.EmitGcovNotes) {
MPM->add(createGCOVProfilerPass(CodeGenOpts.EmitGcovNotes,
- CodeGenOpts.EmitGcovArcs));
+ CodeGenOpts.EmitGcovArcs,
+ TargetTriple.isMacOSX()));
+
if (!CodeGenOpts.DebugInfo)
MPM->add(createStripSymbolsPass(true));
}