[lld] r263389 - Remove a local variable. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 13 13:18:12 PDT 2016
Author: ruiu
Date: Sun Mar 13 15:18:12 2016
New Revision: 263389
URL: http://llvm.org/viewvc/llvm-project?rev=263389&view=rev
Log:
Remove a local variable. NFC.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=263389&r1=263388&r2=263389&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Sun Mar 13 15:18:12 2016
@@ -555,8 +555,7 @@ template <class ELFT> void Writer<ELFT>:
for (const std::unique_ptr<elf::ObjectFile<ELFT>> &F :
Symtab.getObjectFiles()) {
for (SymbolBody *B : F->getLocalSymbols()) {
- auto *L = cast<DefinedRegular<ELFT>>(B);
- const Elf_Sym &Sym = L->Sym;
+ const Elf_Sym &Sym = cast<DefinedRegular<ELFT>>(B)->Sym;
StringRef SymName = check(Sym.getName(F->getStringTable()));
if (!shouldKeepInSymtab<ELFT>(*F, SymName, Sym))
continue;
@@ -567,7 +566,7 @@ template <class ELFT> void Writer<ELFT>:
}
++Out<ELFT>::SymTab->NumLocals;
if (Config->Relocatable)
- L->DynsymIndex = Out<ELFT>::SymTab->NumLocals;
+ B->DynsymIndex = Out<ELFT>::SymTab->NumLocals;
F->KeptLocalSyms.push_back(std::make_pair(
&Sym, Out<ELFT>::SymTab->StrTabSec.addString(SymName)));
}
More information about the llvm-commits
mailing list