aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
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));
}