From: Rafael Espindola Date: Thu, 18 May 2017 18:24:11 +0000 (+0000) Subject: Use existing helper. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4044c1e683a76ca485e8203f901f00aed5aa072;p=llvm Use existing helper. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303368 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h index 42fdfe3e5a7..a4d431b6cbe 100644 --- a/include/llvm/Object/ELF.h +++ b/include/llvm/Object/ELF.h @@ -235,10 +235,7 @@ ELFFile::getSection(const Elf_Sym *Sym, Elf_Sym_Range Symbols, uint32_t Index = *IndexOrErr; if (Index == 0) return nullptr; - auto SectionsOrErr = sections(); - if (!SectionsOrErr) - return SectionsOrErr.takeError(); - return object::getSection(*SectionsOrErr, Index); + return getSection(Index); } template