diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-04-03 17:16:52 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-04-03 17:16:52 +0000 |
commit | 1ef746ba21c9b999f25bcb6dfecea59da90f29a9 (patch) | |
tree | a66292101fc8ed1626fcfc3f5abd3982e297f022 /lld/ELF/Driver.cpp | |
parent | 428e9d9d878441c010daf6b62399d1df69bc9433 (diff) | |
download | bcm5719-llvm-1ef746ba21c9b999f25bcb6dfecea59da90f29a9.tar.gz bcm5719-llvm-1ef746ba21c9b999f25bcb6dfecea59da90f29a9.zip |
[ELF] - Eliminate Lazy class.
Patch removes Lazy class which
is just an excessive layer.
Differential revision: https://reviews.llvm.org/D45083
llvm-svn: 329086
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r-- | lld/ELF/Driver.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index df9f32a61e3..04da6caba2e 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -1081,12 +1081,16 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) { // Handle the `--undefined <sym>` options. for (StringRef S : Config->Undefined) - Symtab->fetchIfLazy<ELFT>(S); + if (Symbol *Sym = Symtab->find(S)) + if (InputFile *F = Symtab->fetchIfLazy(Sym)) + Symtab->addFile<ELFT>(F); // If an entry symbol is in a static archive, pull out that file now // to complete the symbol table. After this, no new names except a // few linker-synthesized ones will be added to the symbol table. - Symtab->fetchIfLazy<ELFT>(Config->Entry); + if (Symbol *Sym = Symtab->find(Config->Entry)) + if (InputFile *F = Symtab->fetchIfLazy(Sym)) + Symtab->addFile<ELFT>(F); // Return if there were name resolution errors. if (errorCount()) |