Do not strip symbols when EH is ON.
authorDevang Patel <dpatel@apple.com>
Sat, 2 Feb 2008 01:32:38 +0000 (01:32 +0000)
committerDevang Patel <dpatel@apple.com>
Sat, 2 Feb 2008 01:32:38 +0000 (01:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46657 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lto/lto.cpp

index c7a363768b8a29f46d8f1ad46cd6b44158fbf13f..ae7f333188b40b303cba82dd77d02ac062563e83 100644 (file)
@@ -292,7 +292,10 @@ LTO::optimize(Module *M, std::ostream &Out,
   // If the -s command line option was specified, strip the symbols out of the
   // resulting program to make it smaller.  -s is a GLD option that we are
   // supporting.
-  Passes.add(createStripSymbolsPass());
+  if(!ExceptionHandling)
+    // FIXME : This causes multiple nameless _.eh symbols on 
+    // darwin when EH is ON.
+    Passes.add(createStripSymbolsPass());
   
   // Propagate constants at call sites into the functions they call.
   Passes.add(createIPConstantPropagationPass());