mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
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
This commit is contained in:
parent
cfb320f5f9
commit
c1685b3a50
@ -93,6 +93,7 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Linker L(Composite.get());
|
||||
for (unsigned i = BaseArg+1; i < InputFilenames.size(); ++i) {
|
||||
OwningPtr<Module> M(LoadFile(argv[0], InputFilenames[i], Context));
|
||||
if (M.get() == 0) {
|
||||
@ -102,8 +103,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
if (Verbose) errs() << "Linking in '" << InputFilenames[i] << "'\n";
|
||||
|
||||
if (Linker::LinkModules(Composite.get(), M.get(), Linker::DestroySource,
|
||||
&ErrorMessage)) {
|
||||
if (L.linkInModule(M.get(), &ErrorMessage)) {
|
||||
errs() << argv[0] << ": link error in '" << InputFilenames[i]
|
||||
<< "': " << ErrorMessage << "\n";
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user