aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lto/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-02-17 22:43:44 +0000
committerDevang Patel <dpatel@apple.com>2009-02-17 22:43:44 +0000
commit74193d7985574276506f66644ae06ab2f8db1484 (patch)
tree2dd5941ede80a7006db04096651c6c048d7d6c2d /tools/lto/LTOCodeGenerator.cpp
parent91099d69c3f33ae818f27ae0f8f7f499b94ff95a (diff)
downloadexternal_llvm-74193d7985574276506f66644ae06ab2f8db1484.zip
external_llvm-74193d7985574276506f66644ae06ab2f8db1484.tar.gz
external_llvm-74193d7985574276506f66644ae06ab2f8db1484.tar.bz2
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
Add support for two additional DWARF attributes to encode Objective-C runtime version number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp6
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));