summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit28b9e8b3a89f3afb077cae17d5f1ab6e03f11f9a (patch)
tree5b0e880ea43b85fcbc3ba7abde4218421e1dbe5e /clang/lib/CodeGen
parent0671ba8448d12cd3a310e5db4286125a08162d3a (diff)
downloadbcm5719-llvm-28b9e8b3a89f3afb077cae17d5f1ab6e03f11f9a.tar.gz
bcm5719-llvm-28b9e8b3a89f3afb077cae17d5f1ab6e03f11f9a.zip
Conditionalize the use of 4.4 or 4.2 format based on the target.
<rdar://problem/8107317> llvm-svn: 131504
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp10
1 files changed, 6 insertions, 4 deletions
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));
}
OpenPOWER on IntegriCloud