diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-11-03 18:20:08 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-11-03 18:20:08 +0000 |
| commit | 271194016acfe2b4eb51733ee7938abf81245cdd (patch) | |
| tree | 28a2d7db3c9e9925cfd1025d7c3425cb57df7029 /lld/ELF/InputFiles.cpp | |
| parent | ed1395a7921957103c22afb391522765c8e2cae2 (diff) | |
| download | bcm5719-llvm-271194016acfe2b4eb51733ee7938abf81245cdd.tar.gz bcm5719-llvm-271194016acfe2b4eb51733ee7938abf81245cdd.zip | |
Simplify by directly using this->Symbols. NFC.
llvm-svn: 285952
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index f8125b92279..0fb3a793981 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -434,10 +434,8 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec, template <class ELFT> void elf::ObjectFile<ELFT>::initializeSymbols(ArrayRef<Elf_Shdr> Sections) { - Elf_Sym_Range Syms = this->getElfSymbols(false); - uint32_t NumSymbols = std::distance(Syms.begin(), Syms.end()); - SymbolBodies.reserve(NumSymbols); - for (const Elf_Sym &Sym : Syms) + SymbolBodies.reserve(this->Symbols.size()); + for (const Elf_Sym &Sym : this->Symbols) SymbolBodies.push_back(createSymbolBody(&Sym)); } |

