Mercurial > projects > ldc
changeset 1390:c5a92bee639d
Don't try to strip metadata if we don't generate any
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 17 May 2009 22:40:02 +0200 |
parents | 0bafe24a329f |
children | 3af4ad55a004 |
files | gen/main.cpp |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/main.cpp Sun May 17 22:02:03 2009 +0200 +++ b/gen/main.cpp Sun May 17 22:40:02 2009 +0200 @@ -36,6 +36,7 @@ #include "gen/linker.h" #include "gen/irstate.h" #include "gen/toobj.h" +#include "gen/metadata.h" #include "gen/passes/Passes.h" #include "gen/cl_options.h" @@ -871,12 +872,14 @@ std::string errormsg; for (int i = 0; i < llvmModules.size(); i++) { +#ifdef USE_METADATA //FIXME: workaround for llvm metadata bug: // the LinkInModule call asserts with metadata unstripped llvm::ModulePass* stripMD = createStripMetaData(); stripMD->runOnModule(*llvmModules[i]); delete stripMD; - +#endif + if(linker.LinkInModule(llvmModules[i], &errormsg)) error("%s", errormsg.c_str()); delete llvmModules[i];