[lld] 5d00d37 - [ELF] Simplify eSyms. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 29 17:00:43 PST 2022
Author: Fangrui Song
Date: 2022-01-29T17:00:38-08:00
New Revision: 5d00d376174326dfb71d22b370dd790c711a9cfa
URL: https://github.com/llvm/llvm-project/commit/5d00d376174326dfb71d22b370dd790c711a9cfa
DIFF: https://github.com/llvm/llvm-project/commit/5d00d376174326dfb71d22b370dd790c711a9cfa.diff
LOG: [ELF] Simplify eSyms. NFC
Added:
Modified:
lld/ELF/InputFiles.cpp
Removed:
################################################################################
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index c01ba9554101..239a36768201 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -1054,8 +1054,7 @@ void ObjFile<ELFT>::initializeSymbols(const object::ELFFile<ELFT> &obj) {
for (size_t i = 0, end = firstGlobal; i != end; ++i) {
const Elf_Sym &eSym = eSyms[i];
- const uint32_t secIdx =
- check(obj.getSectionIndex(eSym, getELFSyms<ELFT>(), shndxTable));
+ const uint32_t secIdx = check(obj.getSectionIndex(eSym, eSyms, shndxTable));
if (LLVM_UNLIKELY(secIdx >= sections.size()))
fatal(toString(this) + ": invalid section index: " + Twine(secIdx));
@@ -1096,8 +1095,7 @@ void ObjFile<ELFT>::initializeSymbols(const object::ELFFile<ELFT> &obj) {
Twine(firstGlobal) + ")");
continue;
}
- const uint32_t secIdx =
- check(obj.getSectionIndex(eSym, getELFSyms<ELFT>(), shndxTable));
+ const uint32_t secIdx = check(obj.getSectionIndex(eSym, eSyms, shndxTable));
if (LLVM_UNLIKELY(secIdx >= sections.size()))
fatal(toString(this) + ": invalid section index: " + Twine(secIdx));
InputSectionBase *sec = sections[secIdx];
More information about the llvm-commits
mailing list