llvm.org GIT mirror llvm / c1685b3
Optimize llvm-link too. This takes the linking of almost all modules in a clang build from 6:32 to 0:19. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181105 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
9292 return 1;
9393 }
9494
95 Linker L(Composite.get());
9596 for (unsigned i = BaseArg+1; i < InputFilenames.size(); ++i) {
9697 OwningPtr M(LoadFile(argv[0], InputFilenames[i], Context));
9798 if (M.get() == 0) {
101102
102103 if (Verbose) errs() << "Linking in '" << InputFilenames[i] << "'\n";
103104
104 if (Linker::LinkModules(Composite.get(), M.get(), Linker::DestroySource,
105 &ErrorMessage)) {
105 if (L.linkInModule(M.get(), &ErrorMessage)) {
106106 errs() << argv[0] << ": link error in '" << InputFilenames[i]
107107 << "': " << ErrorMessage << "\n";
108108 return 1;