llvm.org GIT mirror llvm / 4881f1e
Inline getSectionStringTableIndex() into only caller. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285812 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 3 years ago
1 changed file(s) with 3 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
148148
149149 uintX_t getNumSections() const;
150150 ErrorOr getSectionStringTable() const;
151 uint32_t getSectionStringTableIndex() const;
152151 uint32_t getExtendedSymbolTableIndex(const Elf_Sym *Sym,
153152 const Elf_Shdr *SymTab,
154153 ArrayRef ShndxTable) const;
296295 }
297296
298297 template
299 uint32_t ELFFile::getSectionStringTableIndex() const {
300 if (Header->e_shstrndx == ELF::SHN_XINDEX)
301 return SectionHeaderTable->sh_link;
302 return Header->e_shstrndx;
303 }
304
305 template
306298 ErrorOr ELFFile::getSectionStringTable() const {
307 uint32_t Index = getSectionStringTableIndex();
299 uint32_t Index = Header->e_shstrndx;
300 if (Index == ELF::SHN_XINDEX)
301 Index = SectionHeaderTable->sh_link;
308302 if (!Index) // no section string table.
309303 return "";
310304 ErrorOr StrTabSecOrErr = getSection(Index);