From: Bill Wendling Date: Tue, 17 May 2011 23:06:23 +0000 (+0000) Subject: Conditionalize the use of 4.4 or 4.2 format based on the target. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3621b31cd9255adb1471592ff8116cdc78eb9249;p=clang Conditionalize the use of 4.4 or 4.2 format based on the target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131504 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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)); }