diff options
author | Rui Ueyama <ruiu@google.com> | 2016-03-13 22:08:11 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-03-13 22:08:11 +0000 |
commit | cc232d1f908bf09b1f0065aef4254245dd0677e9 (patch) | |
tree | fe5fec3ba266d3c4546da64afa6581bc747b3ecc | |
parent | 368e1eaa519eae78b9de3e6681a5220ef1e7041b (diff) | |
download | bcm5719-llvm-cc232d1f908bf09b1f0065aef4254245dd0677e9.tar.gz bcm5719-llvm-cc232d1f908bf09b1f0065aef4254245dd0677e9.zip |
Simplify. NFC.
llvm-svn: 263398
-rw-r--r-- | lld/ELF/Writer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 21454c4d4c4..315c2dfb146 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -559,11 +559,9 @@ template <class ELFT> void Writer<ELFT>::copyLocalSymbols() { StringRef SymName = check(Sym.getName(F->getStringTable())); if (!shouldKeepInSymtab<ELFT>(*F, SymName, Sym)) continue; - if (Sym.st_shndx != SHN_ABS) { - InputSectionBase<ELFT> *Section = F->getSection(Sym); - if (!Section->Live) + if (Sym.st_shndx != SHN_ABS) + if (!F->getSection(Sym)->Live) continue; - } ++Out<ELFT>::SymTab->NumLocals; if (Config->Relocatable) B->DynsymIndex = Out<ELFT>::SymTab->NumLocals; |