Mercurial > projects > ldc
changeset 1294:dd84ec4353ce
Strip metadata even when addPassesForOptLevel() isn't called, for instance when
only inlining or when manually specifying passes.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 03 May 2009 20:16:15 +0200 |
parents | 00b408a5b7fa |
children | 0e79fb40c4d0 |
files | gen/optimizer.cpp |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/optimizer.cpp Sun May 03 15:24:05 2009 +0200 +++ b/gen/optimizer.cpp Sun May 03 20:16:15 2009 +0200 @@ -156,13 +156,6 @@ } #endif } -#ifdef USE_METADATA - if (!disableStripMetaData) { - // This one is purposely not disabled by disableLangSpecificPasses - // because the code generator will assert if it's not used. - pm.add(createStripMetaData()); - } -#endif // -O3 if (optimizeLevel >= 3) @@ -252,6 +245,14 @@ 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. + pm.add(createStripMetaData()); + } +#endif + pm.run(*m); return true; }