Mercurial > projects > ldc
view gen/linker.cpp @ 254:8187884566fa trunk
[svn r271] Fixed debug info for implicit 'this' param.
Fixed debug info for arguments passed byval (ref and out params still missing).
author | lindquist |
---|---|
date | Thu, 12 Jun 2008 18:04:28 +0200 |
parents | a95056b3c996 |
children | 21f85bac0b1a |
line wrap: on
line source
#include "gen/llvm.h" #include "llvm/Linker.h" #include "root.h" #include "mars.h" typedef std::vector<llvm::Module*> Module_vector; void linkModules(llvm::Module* dst, const Module_vector& MV) { if (MV.empty()) return; llvm::Linker linker("llvmdc", dst); std::string err; for (Module_vector::const_iterator i=MV.begin(); i!=MV.end(); ++i) { if (!linker.LinkInModule(*i, &err)) { error("%s", err.c_str()); fatal(); } } }