diff gen/optimizer.cpp @ 1483:defafbabbe32

Add a pass to strip the bodies of `available_externally` functions so string literals and `TypeInfo`s only referenced by them can be deleted by `-globaldce`.
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 07 Jun 2009 16:00:13 +0200
parents d9c5f5a43403
children 9ed0695cb93c
line wrap: on
line diff
--- a/gen/optimizer.cpp	Sun Jun 07 16:00:13 2009 +0200
+++ b/gen/optimizer.cpp	Sun Jun 07 16:00:13 2009 +0200
@@ -222,6 +222,9 @@
     }
 
     if (optimizeLevel >= 1) {
+#if LLVM_REV >= 68940
+        addPass(pm, createStripExternalsPass());
+#endif
         addPass(pm, createGlobalDCEPass());
     }