[lld] r285918 - Use the getSectionIndex from llvm.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 07:26:26 PDT 2016
Author: rafael
Date: Thu Nov 3 09:26:25 2016
New Revision: 285918
URL: http://llvm.org/viewvc/llvm-project?rev=285918&view=rev
Log:
Use the getSectionIndex from llvm.
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=285918&r1=285917&r2=285918&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Nov 3 09:26:25 2016
@@ -142,12 +142,7 @@ typename ELFT::SymRange ELFFileBase<ELFT
template <class ELFT>
uint32_t ELFFileBase<ELFT>::getSectionIndex(const Elf_Sym &Sym) const {
- uint32_t I = Sym.st_shndx;
- if (I == ELF::SHN_XINDEX)
- return check(ELFObj.getExtendedSymbolTableIndex(&Sym, Symtab, SymtabSHNDX));
- if (I >= ELF::SHN_LORESERVE)
- return 0;
- return I;
+ return check(ELFObj.getSectionIndex(&Sym, Symtab, SymtabSHNDX));
}
template <class ELFT>
More information about the llvm-commits
mailing list