From: Rafael Espindola Date: Tue, 21 Jul 2015 16:05:53 +0000 (+0000) Subject: Use helper function. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9ea117379c362ba32b51fbc03bd9b780ff079cbb;p=oota-llvm.git Use helper function. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242795 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index b2ddf884a09..bf5fad2800d 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -755,9 +755,7 @@ void ELFDumper::printRelocation(const Elf_Shdr *Sec, TargetName = SecName.get(); } else if (Sym.first) { const Elf_Shdr *SymTable = Sym.first; - ErrorOr StrTableSec = Obj->getSection(SymTable->sh_link); - error(StrTableSec.getError()); - ErrorOr StrTableOrErr = Obj->getStringTable(*StrTableSec); + ErrorOr StrTableOrErr = Obj->getStringTableForSymtab(*SymTable); error(StrTableOrErr.getError()); TargetName = errorOrDefault(Sym.second->getName(*StrTableOrErr)); }