summaryrefslogtreecommitdiff
path: root/tools/obj2yaml
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-29 21:24:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-29 21:24:55 +0000
commit3d176ae165aacd23ff4a68bca966ad2d89e26024 (patch)
treec26160594791bda0eccee3a75dd0c229aaea766c /tools/obj2yaml
parent4c81aa260209379a29ab4bce328160cb333daaf9 (diff)
Convert obj->getSymbolName to sym->getName.
I doesn't depend on the object anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/obj2yaml')
-rw-r--r--tools/obj2yaml/elf2yaml.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/obj2yaml/elf2yaml.cpp b/tools/obj2yaml/elf2yaml.cpp
index 73c83d897d9..e738945b4bd 100644
--- a/tools/obj2yaml/elf2yaml.cpp
+++ b/tools/obj2yaml/elf2yaml.cpp
@@ -189,7 +189,7 @@ std::error_code ELFDumper<ELFT>::dumpRelocation(const Elf_Shdr *Shdr,
return EC;
StringRef StrTab = *StrTabOrErr;
- ErrorOr<StringRef> NameOrErr = Obj.getSymbolName(StrTab, NamePair.second);
+ ErrorOr<StringRef> NameOrErr = NamePair.second->getName(StrTab);
if (std::error_code EC = NameOrErr.getError())
return EC;
R.Symbol = NameOrErr.get();
@@ -314,7 +314,7 @@ ErrorOr<ELFYAML::Group *> ELFDumper<ELFT>::dumpGroup(const Elf_Shdr *Shdr) {
auto sectionContents = Obj.getSectionContents(Shdr);
if (std::error_code ec = sectionContents.getError())
return ec;
- ErrorOr<StringRef> symbolName = Obj.getSymbolName(StrTab, symbol);
+ ErrorOr<StringRef> symbolName = symbol->getName(StrTab);
if (std::error_code EC = symbolName.getError())
return EC;
S->Info = *symbolName;