diff options
| author | Rui Ueyama <ruiu@google.com> | 2017-06-21 15:36:24 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2017-06-21 15:36:24 +0000 |
| commit | d1f8b8162b11bebb948f9361f578263e4b847039 (patch) | |
| tree | c09513c1b4738157edf9ad2945c788b591f53231 /lld/ELF/InputFiles.cpp | |
| parent | 8f9621ae0407e31dab865d9aa7235501125032f3 (diff) | |
| download | bcm5719-llvm-d1f8b8162b11bebb948f9361f578263e4b847039.tar.gz bcm5719-llvm-d1f8b8162b11bebb948f9361f578263e4b847039.zip | |
Implement the --exclude-libs option.
The --exclude-libs option is not a popular option, but at least some
programs in Android depend on it, so it's worth to support it.
Differential Revision: https://reviews.llvm.org/D34422
llvm-svn: 305920
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 3d11239bf88..1ff0b4224e7 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -632,8 +632,9 @@ ArchiveFile::ArchiveFile(std::unique_ptr<Archive> &&File) File(std::move(File)) {} template <class ELFT> void ArchiveFile::parse() { + Symbols.reserve(File->getNumberOfSymbols()); for (const Archive::Symbol &Sym : File->symbols()) - Symtab<ELFT>::X->addLazyArchive(this, Sym); + Symbols.push_back(Symtab<ELFT>::X->addLazyArchive(this, Sym)); } // Returns a buffer pointing to a member file containing a given symbol. |

