Use helper function. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-07-23 12:51:44 +00:00
parent a7616cd14c
commit 52f969b029

View File

@ -343,10 +343,7 @@ ErrorOr<ELFYAML::Group *> ELFDumper<ELFT>::dumpGroup(const Elf_Shdr *Shdr) {
return EC;
const Elf_Shdr *Symtab = *SymtabOrErr;
const Elf_Sym *symbol = Obj.getSymbol(Symtab, Shdr->sh_info);
ErrorOr<const Elf_Shdr *> StrTabSec = Obj.getSection(Symtab->sh_link);
if (std::error_code EC = StrTabSec.getError())
return EC;
ErrorOr<StringRef> StrTabOrErr = Obj.getStringTable(*StrTabSec);
ErrorOr<StringRef> StrTabOrErr = Obj.getStringTableForSymtab(*Symtab);
if (std::error_code EC = StrTabOrErr.getError())
return EC;
StringRef StrTab = *StrTabOrErr;