[lld] r275605 - Remove variables. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 13:05:05 PDT 2016


Author: ruiu
Date: Fri Jul 15 15:05:05 2016
New Revision: 275605

URL: http://llvm.org/viewvc/llvm-project?rev=275605&view=rev
Log:
Remove variables. NFC.

Modified:
    lld/trunk/ELF/InputFiles.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=275605&r1=275604&r2=275605&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Fri Jul 15 15:05:05 2016
@@ -138,12 +138,10 @@ void elf::ObjectFile<ELFT>::parse(DenseS
 template <class ELFT>
 StringRef elf::ObjectFile<ELFT>::getShtGroupSignature(const Elf_Shdr &Sec) {
   const ELFFile<ELFT> &Obj = this->ELFObj;
-  uint32_t SymtabdSectionIndex = Sec.sh_link;
-  const Elf_Shdr *SymtabSec = check(Obj.getSection(SymtabdSectionIndex));
-  uint32_t SymIndex = Sec.sh_info;
-  const Elf_Sym *Sym = Obj.getSymbol(SymtabSec, SymIndex);
-  StringRef StringTable = check(Obj.getStringTableForSymtab(*SymtabSec));
-  return check(Sym->getName(StringTable));
+  const Elf_Shdr *Symtab = check(Obj.getSection(Sec.sh_link));
+  const Elf_Sym *Sym = Obj.getSymbol(Symtab, Sec.sh_info);
+  StringRef Strtab = check(Obj.getStringTableForSymtab(*Symtab));
+  return check(Sym->getName(Strtab));
 }
 
 template <class ELFT>




More information about the llvm-commits mailing list