[PATCH] D65393: [llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 04:18:53 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL367833: [llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). (authored by grimar, committed by ).
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D65393?vs=212145&id=213318#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65393/new/
https://reviews.llvm.org/D65393
Files:
llvm/trunk/include/llvm/Object/ELF.h
Index: llvm/trunk/include/llvm/Object/ELF.h
===================================================================
--- llvm/trunk/include/llvm/Object/ELF.h
+++ llvm/trunk/include/llvm/Object/ELF.h
@@ -271,7 +271,6 @@
Elf_Sym_Range Symtab,
ArrayRef<Elf_Word> ShndxTable) const;
Expected<const Elf_Shdr *> getSection(uint32_t Index) const;
- Expected<const Elf_Shdr *> getSection(const StringRef SectionName) const;
Expected<const Elf_Sym *> getSymbol(const Elf_Shdr *Sec,
uint32_t Index) const;
@@ -569,23 +568,6 @@
}
template <class ELFT>
-Expected<const typename ELFT::Shdr *>
-ELFFile<ELFT>::getSection(const StringRef SectionName) const {
- auto TableOrErr = sections();
- if (!TableOrErr)
- return TableOrErr.takeError();
- for (auto &Sec : *TableOrErr) {
- auto SecNameOrErr = getSectionName(&Sec);
- if (!SecNameOrErr)
- return SecNameOrErr.takeError();
- if (*SecNameOrErr == SectionName)
- return &Sec;
- }
- // TODO: this error is untested.
- return createError("invalid section name");
-}
-
-template <class ELFT>
Expected<StringRef>
ELFFile<ELFT>::getStringTable(const Elf_Shdr *Section) const {
if (Section->sh_type != ELF::SHT_STRTAB)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65393.213318.patch
Type: text/x-patch
Size: 1312 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190805/349fba69/attachment-0001.bin>
More information about the llvm-commits
mailing list