diff options
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index e0e1f52..b003daf 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -356,6 +356,10 @@ bool LTOCodeGenerator::generateAssemblyCode(raw_ostream& out, // Add an appropriate TargetData instance for this module... passes.add(new TargetData(*_target->getTargetData())); + std::string targetTriple = _linker.getModule()->getTargetTriple(); +// if ( targetTriple.find("darwin") != targetTriple.size() ) + passes.add(createStripSymbolsPass(true /* strip debug info only */)); + // Propagate constants at call sites into the functions they call. This // opens opportunities for globalopt (and inlining) by substituting function // pointers passed as arguments to direct uses of functions. @@ -412,6 +416,8 @@ bool LTOCodeGenerator::generateAssemblyCode(raw_ostream& out, // Make sure everything is still good. passes.add(createVerifierPass()); + setCodeGenDebugOptions("-debug-pass=Structure"); + FunctionPassManager* codeGenPasses = new FunctionPassManager(new ExistingModuleProvider(mergedModule)); |