[lld] r259903 - Simplify. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 11:13:18 PST 2016


Author: ruiu
Date: Fri Feb  5 13:13:18 2016
New Revision: 259903

URL: http://llvm.org/viewvc/llvm-project?rev=259903&view=rev
Log:
Simplify. NFC.

Modified:
    lld/trunk/ELF/OutputSections.cpp

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=259903&r1=259902&r2=259903&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Feb  5 13:13:18 2016
@@ -271,8 +271,7 @@ template <class ELFT> void RelocationSec
 }
 
 template <class ELFT> unsigned RelocationSection<ELFT>::getRelocOffset() {
-  const unsigned EntrySize = IsRela ? sizeof(Elf_Rela) : sizeof(Elf_Rel);
-  return EntrySize * Relocs.size();
+  return this->Header.sh_entsize * Relocs.size();
 }
 
 template <class ELFT> void RelocationSection<ELFT>::finalize() {




More information about the llvm-commits mailing list