From: Rafael Espindola <rafael.espindola@gmail.com>
Date: Thu, 3 Nov 2016 17:18:31 +0000 (+0000)
Subject: Delete dead code.
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=074ecc25c328e93c45e30806b11cd906fda3730d;p=llvm

Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285940 91177308-0d34-0410-b5e6-96231b3b80d8
---

diff --git a/include/llvm/Object/ELF.h b/include/llvm/Object/ELF.h
index 07f16112938..2155fea5d26 100644
--- a/include/llvm/Object/ELF.h
+++ b/include/llvm/Object/ELF.h
@@ -132,18 +132,11 @@ public:
   }
 
   /// \brief Iterate over program header table.
-  const Elf_Phdr *program_header_begin() const {
+  const Elf_Phdr_Range program_headers() const {
     if (Header->e_phnum && Header->e_phentsize != sizeof(Elf_Phdr))
       report_fatal_error("Invalid program header size");
-    return reinterpret_cast<const Elf_Phdr *>(base() + Header->e_phoff);
-  }
-
-  const Elf_Phdr *program_header_end() const {
-    return program_header_begin() + Header->e_phnum;
-  }
-
-  const Elf_Phdr_Range program_headers() const {
-    return makeArrayRef(program_header_begin(), program_header_end());
+    auto *Begin = reinterpret_cast<const Elf_Phdr *>(base() + Header->e_phoff);
+    return makeArrayRef(Begin, Begin+Header->e_phnum);
   }
 
   ErrorOr<StringRef> getSectionStringTable(Elf_Shdr_Range Sections) const;