diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-03 14:41:17 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-03 14:41:17 +0000 |
commit | 714c2959e6f21a3a6ad73ff182e4f1df8cfab7e7 (patch) | |
tree | 301ace60b3f64f52dabc2e49158873b1a936b78d /llvm/tools/llvm-readobj/ELFDumper.cpp | |
parent | f867a40bf60ad813560fe4cc3d2cc100472ffef4 (diff) | |
download | bcm5719-llvm-714c2959e6f21a3a6ad73ff182e4f1df8cfab7e7.tar.gz bcm5719-llvm-714c2959e6f21a3a6ad73ff182e4f1df8cfab7e7.zip |
Move a free function out of ELFFile.
llvm-svn: 285920
Diffstat (limited to 'llvm/tools/llvm-readobj/ELFDumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/ELFDumper.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index e6041530b06..5507bc5ac93 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -696,11 +696,11 @@ std::string ELFDumper<ELFT>::getFullSymbolName(const Elf_Sym *Symbol, return FullSymbolName; } -template <typename ELFO> +template <typename ELFT> static void -getSectionNameIndex(const ELFO &Obj, const typename ELFO::Elf_Sym *Symbol, - const typename ELFO::Elf_Sym *FirstSym, - ArrayRef<typename ELFO::Elf_Word> ShndxTable, +getSectionNameIndex(const ELFFile<ELFT> &Obj, const typename ELFT::Sym *Symbol, + const typename ELFT::Sym *FirstSym, + ArrayRef<typename ELFT::Word> ShndxTable, StringRef &SectionName, unsigned &SectionIndex) { SectionIndex = Symbol->st_shndx; if (Symbol->isUndefined()) @@ -717,9 +717,9 @@ getSectionNameIndex(const ELFO &Obj, const typename ELFO::Elf_Sym *Symbol, SectionName = "Reserved"; else { if (SectionIndex == SHN_XINDEX) - SectionIndex = unwrapOrError( - Obj.getExtendedSymbolTableIndex(Symbol, FirstSym, ShndxTable)); - const typename ELFO::Elf_Shdr *Sec = + SectionIndex = unwrapOrError(object::getExtendedSymbolTableIndex<ELFT>( + Symbol, FirstSym, ShndxTable)); + const typename ELFT::Shdr *Sec = unwrapOrError(Obj.getSection(SectionIndex)); SectionName = unwrapOrError(Obj.getSectionName(Sec)); } @@ -2737,7 +2737,7 @@ std::string GNUStyle<ELFT>::getSymbolSectionNdx(const ELFO *Obj, case ELF::SHN_COMMON: return "COM"; case ELF::SHN_XINDEX: - SectionIndex = unwrapOrError(Obj->getExtendedSymbolTableIndex( + SectionIndex = unwrapOrError(object::getExtendedSymbolTableIndex<ELFT>( Symbol, FirstSym, this->dumper()->getShndxTable())); default: // Find if: |