diff gen/optimizer.cpp @ 1533:d1652c8fb4f6

Get rid of USE_METADATA
author Benjamin Kramer <benny.kra@gmail.com>
date Sat, 11 Jul 2009 14:19:21 +0200
parents c88b16d4a13c
children 259b031f3d22
line wrap: on
line diff
--- a/gen/optimizer.cpp	Sat Jul 11 14:09:33 2009 +0200
+++ b/gen/optimizer.cpp	Sat Jul 11 14:19:21 2009 +0200
@@ -53,7 +53,6 @@
     cl::desc("Disable simplification of runtime calls in -O<N>"),
     cl::ZeroOrMore);
 
-#ifdef USE_METADATA
 static cl::opt<bool>
 disableGCToStack("disable-gc2stack",
     cl::desc("Disable promotion of GC allocations to stack memory in -O<N>"),
@@ -64,7 +63,6 @@
 disableStripMetaData("disable-strip-metadata",
     cl::desc("Disable default metadata stripping (not recommended)"),
     cl::ZeroOrMore);
-#endif
 
 static cl::opt<opts::BoolOrDefaultAdapter, false, opts::FlagParser>
 enableInlining("inlining",
@@ -225,7 +223,6 @@
 bool ldc_optimize_module(llvm::Module* m)
 {
     if (!optimize()) {
-#ifdef USE_METADATA
         if (!disableStripMetaData) {
             // This one always needs to run if metadata is generated, because
             // the code generator will assert if it's not used.
@@ -233,7 +230,6 @@
             stripMD->runOnModule(*m);
             delete stripMD;
         }
-#endif
         return false;
     }
 
@@ -272,13 +268,11 @@
     if (optimize)
         addPassesForOptLevel(pm);
 
-#ifdef USE_METADATA
     if (!disableStripMetaData) {
         // This one is purposely not disabled by disableLangSpecificPasses
         // because the code generator will assert if it's not used.
         addPass(pm, createStripMetaData());
     }
-#endif
 
     pm.run(*m);
     return true;