summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index ee9eff72bf9..5850b30ca0d 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -291,7 +291,7 @@ void elf::ObjectFile<ELFT>::initializeSections(
unsigned I = -1;
const ELFFile<ELFT> &Obj = this->ELFObj;
StringRef SectionStringTable = check(Obj.getSectionStringTable());
- for (const Elf_Shdr &Sec : Obj.sections()) {
+ for (const Elf_Shdr &Sec : check(Obj.sections())) {
++I;
if (Sections[I] == &InputSection<ELFT>::Discarded)
continue;
@@ -578,7 +578,7 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() {
const Elf_Shdr *DynamicSec = nullptr;
const ELFFile<ELFT> Obj = this->ELFObj;
- for (const Elf_Shdr &Sec : Obj.sections()) {
+ for (const Elf_Shdr &Sec : check(Obj.sections())) {
switch (Sec.sh_type) {
default:
continue;
@@ -891,7 +891,7 @@ template <class ELFT> std::vector<StringRef> LazyObjectFile::getElfSymbols() {
typedef typename ELFT::SymRange Elf_Sym_Range;
const ELFFile<ELFT> Obj = createELFObj<ELFT>(this->MB);
- for (const Elf_Shdr &Sec : Obj.sections()) {
+ for (const Elf_Shdr &Sec : check(Obj.sections())) {
if (Sec.sh_type != SHT_SYMTAB)
continue;
Elf_Sym_Range Syms = Obj.symbols(&Sec);
OpenPOWER on IntegriCloud