[llvm] r242795 - Use helper function. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jul 21 09:05:54 PDT 2015
Author: rafael
Date: Tue Jul 21 11:05:53 2015
New Revision: 242795
URL: http://llvm.org/viewvc/llvm-project?rev=242795&view=rev
Log:
Use helper function. NFC.
Modified:
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=242795&r1=242794&r2=242795&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Tue Jul 21 11:05:53 2015
@@ -755,9 +755,7 @@ void ELFDumper<ELFT>::printRelocation(co
TargetName = SecName.get();
} else if (Sym.first) {
const Elf_Shdr *SymTable = Sym.first;
- ErrorOr<const Elf_Shdr *> StrTableSec = Obj->getSection(SymTable->sh_link);
- error(StrTableSec.getError());
- ErrorOr<StringRef> StrTableOrErr = Obj->getStringTable(*StrTableSec);
+ ErrorOr<StringRef> StrTableOrErr = Obj->getStringTableForSymtab(*SymTable);
error(StrTableOrErr.getError());
TargetName = errorOrDefault(Sym.second->getName(*StrTableOrErr));
}
More information about the llvm-commits
mailing list