From 52f969b02980f45faeb5e260526c4dca58fc9fa5 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 23 Jul 2015 12:51:44 +0000 Subject: [PATCH] Use helper function. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243012 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/obj2yaml/elf2yaml.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/obj2yaml/elf2yaml.cpp b/tools/obj2yaml/elf2yaml.cpp index 212e911452f..2c6fc1bb09c 100644 --- a/tools/obj2yaml/elf2yaml.cpp +++ b/tools/obj2yaml/elf2yaml.cpp @@ -343,10 +343,7 @@ ErrorOr ELFDumper::dumpGroup(const Elf_Shdr *Shdr) { return EC; const Elf_Shdr *Symtab = *SymtabOrErr; const Elf_Sym *symbol = Obj.getSymbol(Symtab, Shdr->sh_info); - ErrorOr StrTabSec = Obj.getSection(Symtab->sh_link); - if (std::error_code EC = StrTabSec.getError()) - return EC; - ErrorOr StrTabOrErr = Obj.getStringTable(*StrTabSec); + ErrorOr StrTabOrErr = Obj.getStringTableForSymtab(*Symtab); if (std::error_code EC = StrTabOrErr.getError()) return EC; StringRef StrTab = *StrTabOrErr;