From 28b9e8b3a89f3afb077cae17d5f1ab6e03f11f9a Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 17 May 2011 23:06:23 +0000 Subject: Conditionalize the use of 4.4 or 4.2 format based on the target. llvm-svn: 131504 --- clang/lib/CodeGen/BackendUtil.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/BackendUtil.cpp') diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 1264473dabc..e6570d40866 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/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)); } -- cgit v1.2.3