diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-02 14:52:50 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-02 14:52:50 +0000 |
| commit | b39cacf2a9d46299f77040937a0d62def0b8c537 (patch) | |
| tree | 2a41504c49da599ed1b273a0a6426c9b625029d9 | |
| parent | 235d82cd0a6d5a63bed4d40d05a9be82e1f9c618 (diff) | |
| download | bcm5719-llvm-b39cacf2a9d46299f77040937a0d62def0b8c537.tar.gz bcm5719-llvm-b39cacf2a9d46299f77040937a0d62def0b8c537.zip | |
Inline getSectionStringTableIndex() into only caller. NFC.
llvm-svn: 285812
| -rw-r--r-- | llvm/include/llvm/Object/ELF.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index 11239061bc6..649cada7528 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -149,7 +149,6 @@ public: uintX_t getNumSections() const; ErrorOr<StringRef> getSectionStringTable() const; - uint32_t getSectionStringTableIndex() const; uint32_t getExtendedSymbolTableIndex(const Elf_Sym *Sym, const Elf_Shdr *SymTab, ArrayRef<Elf_Word> ShndxTable) const; @@ -297,15 +296,10 @@ typename ELFT::uint ELFFile<ELFT>::getNumSections() const { } template <class ELFT> -uint32_t ELFFile<ELFT>::getSectionStringTableIndex() const { - if (Header->e_shstrndx == ELF::SHN_XINDEX) - return SectionHeaderTable->sh_link; - return Header->e_shstrndx; -} - -template <class ELFT> ErrorOr<StringRef> ELFFile<ELFT>::getSectionStringTable() const { - uint32_t Index = getSectionStringTableIndex(); + uint32_t Index = Header->e_shstrndx; + if (Index == ELF::SHN_XINDEX) + Index = SectionHeaderTable->sh_link; if (!Index) // no section string table. return ""; ErrorOr<const Elf_Shdr *> StrTabSecOrErr = getSection(Index); |

