diff options
Diffstat (limited to 'ELF/InputFiles.cpp')
-rw-r--r-- | ELF/InputFiles.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ELF/InputFiles.cpp b/ELF/InputFiles.cpp index 3d11239bf88f9..1ff0b4224e701 100644 --- a/ELF/InputFiles.cpp +++ b/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. |