summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-08-05 11:19:28 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-08-05 11:19:28 +0000
commitc9051861cb29b0d539a42ece13cdf2b133aae19b (patch)
treebab565cfc892c933ba141065ac9b874b0f2e4863
parent208d63ea9018f74f8035a128a56d136fe2089f02 (diff)
downloadbcm5719-llvm-c9051861cb29b0d539a42ece13cdf2b133aae19b.tar.gz
bcm5719-llvm-c9051861cb29b0d539a42ece13cdf2b133aae19b.zip
[llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.
This method is dead. It was introduced in D47989, but now the logic from D63475 is used in llvm-readobj instead. Also it has a problem: it returns the first matching section, even if there are multiple sections with the same name. Differential revision: https://reviews.llvm.org/D65393 llvm-svn: 367833
-rw-r--r--llvm/include/llvm/Object/ELF.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h
index c18453d1155..aa0864edb78 100644
--- a/llvm/include/llvm/Object/ELF.h
+++ b/llvm/include/llvm/Object/ELF.h
@@ -271,7 +271,6 @@ public:
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 @@ ELFFile<ELFT>::getSection(uint32_t Index) const {
}
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)
OpenPOWER on IntegriCloud