Use lazy parsing in LTO. Unfortunately this is only a 3% time saving for

'ar'. Have to figure out how to make libLTO even lazier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127901 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-03-18 19:51:00 +00:00
parent 19f6f503d6
commit f19d7a7af3
2 changed files with 27 additions and 8 deletions

View File

@@ -87,6 +87,10 @@ LTOCodeGenerator::~LTOCodeGenerator()
bool LTOCodeGenerator::addModule(LTOModule* mod, std::string& errMsg)
{
if(mod->getLLVVMModule()->MaterializeAllPermanently(&errMsg))
return true;
bool ret = _linker.LinkInModule(mod->getLLVVMModule(), &errMsg);
const std::vector<const char*> &undefs = mod->getAsmUndefinedRefs();