From d42f4e5389ff8c8ed8f29c1ee80a941663409929 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 8 Oct 2015 12:02:38 +0000 Subject: [PATCH] Add a convenience variable. NFC. llvm-svn: 249682 --- lld/ELF/InputFiles.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 3dfe6b0f3bd1..71fa98b8c313 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -105,14 +105,14 @@ template void elf2::ObjectFile::initializeSections() { uint64_t Size = this->ELFObj.getNumSections(); Sections.resize(Size); unsigned I = 0; - for (const Elf_Shdr &Sec : this->ELFObj.sections()) { + const ELFFile &Obj = this->ELFObj; + for (const Elf_Shdr &Sec : Obj.sections()) { switch (Sec.sh_type) { case SHT_SYMTAB: this->Symtab = &Sec; break; case SHT_SYMTAB_SHNDX: { - ErrorOr> ErrorOrTable = - this->ELFObj.getSHNDXTable(Sec); + ErrorOr> ErrorOrTable = Obj.getSHNDXTable(Sec); error(ErrorOrTable); SymtabSHNDX = *ErrorOrTable; break;