Conditionalize the use of 4.4 or 4.2 format based on the target.

<rdar://problem/8107317>

llvm-svn: 131504
This commit is contained in:
Bill Wendling 2011-05-17 23:06:23 +00:00
parent 0671ba8448
commit 28b9e8b3a8
1 changed files with 6 additions and 4 deletions

View File

@ -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));
}